depot-github-runners

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Depot GitHub Actions Runners

Depot GitHub Actions 运行器

Depot provides managed, ephemeral, single-tenant GitHub Actions runners. Drop-in replacement for GitHub-hosted runners — change the
runs-on
label and everything else stays the same.
Requirement: Repository must be owned by a GitHub organization (not a personal account).
Depot 提供托管式、临时单租户的GitHub Actions运行器,可直接替代GitHub官方托管的运行器——只需修改
runs-on
标签,其余配置保持不变。
要求: 仓库必须归GitHub组织所有(而非个人账号)。

Setup

搭建步骤

  1. Depot dashboard → GitHub Actions → Connect to GitHub → Install Depot GitHub App
  2. For public repos: GitHub org settings → Actions → Runner groups → Default → "Allow public repositories"
  3. Update
    runs-on
    in your workflow files
  1. 进入Depot控制台 → GitHub Actions → 连接到GitHub → 安装Depot GitHub应用
  2. 对于公共仓库:进入GitHub组织设置 → Actions → 运行器组 → 默认组 → 勾选"允许公共仓库"
  3. 更新工作流文件中的
    runs-on
    配置

Runner Labels

运行器标签

Use a single label. Format:
depot-{os}-{version}[-{arch}][-{size}]
使用单个标签,格式为:
depot-{操作系统}-{版本}[-{架构}][-{规格}]

Ubuntu (Intel x86 — AMD EPYC)

Ubuntu(Intel x86 — AMD EPYC)

LabelCPUsRAMDisk$/min
depot-ubuntu-24.04
28 GB100 GB$0.004
depot-ubuntu-24.04-4
416 GB130 GB$0.008
depot-ubuntu-24.04-8
832 GB150 GB$0.016
depot-ubuntu-24.04-16
1664 GB180 GB$0.032
depot-ubuntu-24.04-32
32128 GB200 GB$0.064
depot-ubuntu-24.04-64
64256 GB250 GB$0.128
Ubuntu 22.04 also available:
depot-ubuntu-22.04
,
depot-ubuntu-22.04-4
, etc.
标签CPU核心数内存磁盘单价(美元/分钟)
depot-ubuntu-24.04
28 GB100 GB$0.004
depot-ubuntu-24.04-4
416 GB130 GB$0.008
depot-ubuntu-24.04-8
832 GB150 GB$0.016
depot-ubuntu-24.04-16
1664 GB180 GB$0.032
depot-ubuntu-24.04-32
32128 GB200 GB$0.064
depot-ubuntu-24.04-64
64256 GB250 GB$0.128
Ubuntu 22.04版本同样可用:
depot-ubuntu-22.04
depot-ubuntu-22.04-4
等。

Ubuntu (ARM — Graviton4)

Ubuntu(ARM — Graviton4)

Same sizes and pricing as Intel. Add
-arm
suffix:
depot-ubuntu-24.04-arm
,
depot-ubuntu-24.04-arm-4
,
depot-ubuntu-24.04-arm-8
, etc.
规格和定价与Intel版本一致,添加
-arm
后缀即可:
depot-ubuntu-24.04-arm
depot-ubuntu-24.04-arm-4
depot-ubuntu-24.04-arm-8
等。

Windows Server

Windows Server

LabelCPUsRAM$/min
depot-windows-2025
28 GB$0.008
depot-windows-2025-4
416 GB$0.016
depot-windows-2025-8
through
-64
8–6432–256 GB$0.032–$0.256
Windows Server 2022 also available:
depot-windows-2022
, etc. Windows limitation: No Hyper-V. Docker does not work on Windows runners.
标签CPU核心数内存单价(美元/分钟)
depot-windows-2025
28 GB$0.008
depot-windows-2025-4
416 GB$0.016
depot-windows-2025-8
-64
8–6432–256 GB$0.032–$0.256
Windows Server 2022版本同样可用:
depot-windows-2022
等。 Windows限制: 不支持Hyper-V,Docker无法在Windows运行器上使用。

macOS (Apple M2)

macOS(Apple M2)

LabelCPUsRAM$/min
depot-macos-15
/
depot-macos-latest
824 GB$0.08
depot-macos-14
824 GB$0.08
macOS is NOT fully elastic — fixed pool with FIFO queuing. Startup plan+ only.
标签CPU核心数内存单价(美元/分钟)
depot-macos-15
/
depot-macos-latest
824 GB$0.08
depot-macos-14
824 GB$0.08
macOS运行器并非完全弹性伸缩——采用固定资源池与FIFO排队机制,仅适用于Startup及以上套餐。

Aliases

别名

depot-ubuntu-latest
→ Ubuntu 24.04,
depot-windows-latest
→ Windows 2025,
depot-macos-latest
→ macOS 15
depot-ubuntu-latest
→ Ubuntu 24.04,
depot-windows-latest
→ Windows 2025,
depot-macos-latest
→ macOS 15

Migration Example

迁移示例

yaml
jobs:
  build:
    # Before:
    # runs-on: ubuntu-latest
    # After:
    runs-on: depot-ubuntu-24.04-4
    steps:
      - uses: actions/checkout@v4
      - run: npm ci
      - run: npm test
yaml
jobs:
  build:
    # 之前的配置:
    # runs-on: ubuntu-latest
    # 修改后:
    runs-on: depot-ubuntu-24.04-4
    steps:
      - uses: actions/checkout@v4
      - run: npm ci
      - run: npm test

Common Mistakes

常见错误

yaml
undefined
yaml
undefined

❌ WRONG — multiple labels cause stability issues

❌ 错误写法 — 多个标签会导致稳定性问题

runs-on: [self-hosted, depot-ubuntu-24.04]
runs-on: [self-hosted, depot-ubuntu-24.04]

✅ CORRECT — always use a single Depot runner label

✅ 正确写法 — 始终使用单个Depot运行器标签

runs-on: depot-ubuntu-24.04-4
undefined
runs-on: depot-ubuntu-24.04-4
undefined

Caching

缓存机制

Actions using the GitHub Actions cache API automatically use Depot Cache — no config changes needed. This includes
actions/cache
,
actions/setup-node
,
actions/setup-python
,
actions/setup-java
, and any action using
@actions/cache
.
Pre-configured build tool caches (zero config on Depot runners):
ToolWhat's pre-configured
Turborepo
TURBO_API
env var set — just run
turbo build
Bazel
~/.bazelrc
pre-populated — just run
bazel build //...
sccache
SCCACHE_WEBDAV_ENDPOINT
set — use
RUSTC_WRAPPER: 'sccache'
Maven
settings.xml
pre-populated (cache id
depot-cache
)
Pants
pants.toml
pre-configured — just run
pants package ::
moonrepoEnv vars set — just run
moon run build
Cache behavior: repository-scoped, no branch isolation, encrypted, up to 1000 MiB/s throughput, configurable retention (7/14/30 days).
To disable auto-cache: org settings → turn off "Allow Actions jobs to automatically connect to Depot Cache."
使用GitHub Actions缓存API的动作会自动使用Depot Cache——无需修改任何配置。这包括
actions/cache
actions/setup-node
actions/setup-python
actions/setup-java
,以及所有使用
@actions/cache
的动作。
预配置的构建工具缓存(在Depot运行器上无需额外配置):
工具预配置内容
Turborepo已设置
TURBO_API
环境变量 — 直接运行
turbo build
即可
Bazel已预填充
~/.bazelrc
— 直接运行
bazel build //...
即可
sccache已设置
SCCACHE_WEBDAV_ENDPOINT
— 使用
RUSTC_WRAPPER: 'sccache'
即可
Maven已预填充
settings.xml
(缓存ID为
depot-cache
Pants已配置
pants.toml
— 直接运行
pants package ::
即可
moonrepo已设置环境变量 — 直接运行
moon run build
即可
缓存特性:仓库级作用域、无分支隔离、加密存储、最高1000 MiB/s的吞吐量、可配置保留时长(7/14/30天)。
如需禁用自动缓存:进入组织设置 → 关闭"允许Actions任务自动连接到Depot Cache"。

Dagger Integration

Dagger集成

yaml
runs-on: depot-ubuntu-latest,dagger=0.15.1
Launches a dedicated Dagger Engine VM with persistent NVMe cache. Dagger CLI pre-installed. Additional $0.04/min.
yaml
runs-on: depot-ubuntu-latest,dagger=0.15.1
启动带有持久化NVMe缓存的专用Dagger Engine虚拟机,已预安装Dagger CLI。额外费用为0.04美元/分钟。

Egress Filtering (Linux Only)

出口过滤(仅Linux支持)

Configure in org settings → GitHub Actions Runners → Egress Rules. Set default rule to Allow or Deny, then add specific allow/deny rules for IPs, CIDRs, or hostnames. Not supported on macOS or Windows. Incompatible with Tailscale.
在组织设置 → GitHub Actions运行器 → 出口规则中配置。设置默认规则为允许或拒绝,然后添加针对IP、CIDR或主机名的具体允许/拒绝规则。此功能不支持macOS或Windows,且与Tailscale不兼容。

Dependabot

Dependabot集成

Enable "Dependabot on self-hosted runners" in GitHub org settings. Jobs auto-run on
depot-ubuntu-latest
.
Important: OIDC is not supported for Dependabot. Use
token:
input with a
DEPOT_TOKEN
secret instead.
在GitHub组织设置中启用"在自托管运行器上运行Dependabot"。任务将自动在
depot-ubuntu-latest
运行器上执行。
重要提示: Dependabot不支持OIDC,请使用
token:
参数并传入
DEPOT_TOKEN
密钥替代。

SSH Debugging

SSH调试

yaml
steps:
  - uses: actions/checkout@v4
  - uses: mxschmitt/action-tmate@v3
  - run: npm test
yaml
steps:
  - uses: actions/checkout@v4
  - uses: mxschmitt/action-tmate@v3
  - run: npm test

Troubleshooting

故障排查

ErrorFix
"No space left on device"OS uses ~70 GB disk; upgrade to larger runner or clean disk in workflow
"Lost communication with server"Check status.depot.dev; check org usage caps
"Operation was canceled"Manual cancel, concurrency cancel-in-progress, or OOM — check memory in dashboard
"Unable to get ACTIONS_ID_TOKEN_REQUEST_URL"Dependabot doesn't support OIDC — use
DEPOT_TOKEN
secret
Workflows not startingVerify single runner label; check runner group allows the repo; verify Depot GitHub App permissions
Stuck workflowsForce cancel via GitHub API:
POST /repos/{owner}/{repo}/actions/runs/{id}/force-cancel
错误信息解决方法
"No space left on device"(设备存储空间不足)操作系统已占用约70 GB磁盘;升级至更大规格的运行器,或在工作流中添加磁盘清理步骤
"Lost communication with server"(与服务器失去连接)查看status.depot.dev状态页面;检查组织的资源使用上限
"Operation was canceled"(操作已取消)手动取消、并发策略取消进行中的任务,或内存不足——在控制台中查看内存使用情况
"Unable to get ACTIONS_ID_TOKEN_REQUEST_URL"(无法获取ACTIONS_ID_TOKEN_REQUEST_URL)Dependabot不支持OIDC — 使用
DEPOT_TOKEN
密钥替代
工作流无法启动验证是否使用单个运行器标签;检查运行器组是否允许该仓库使用;验证Depot GitHub应用的权限
工作流卡住通过GitHub API强制取消:
POST /repos/{owner}/{repo}/actions/runs/{id}/force-cancel