depot-github-runners
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDepot GitHub Actions Runners
Depot GitHub Actions 运行器
Depot provides managed, ephemeral, single-tenant GitHub Actions runners. Drop-in replacement for GitHub-hosted runners — change the label and everything else stays the same.
runs-onRequirement: Repository must be owned by a GitHub organization (not a personal account).
Depot 提供托管式、临时单租户的GitHub Actions运行器,可直接替代GitHub官方托管的运行器——只需修改标签,其余配置保持不变。
runs-on要求: 仓库必须归GitHub组织所有(而非个人账号)。
Setup
搭建步骤
- Depot dashboard → GitHub Actions → Connect to GitHub → Install Depot GitHub App
- For public repos: GitHub org settings → Actions → Runner groups → Default → "Allow public repositories"
- Update in your workflow files
runs-on
- 进入Depot控制台 → GitHub Actions → 连接到GitHub → 安装Depot GitHub应用
- 对于公共仓库:进入GitHub组织设置 → Actions → 运行器组 → 默认组 → 勾选"允许公共仓库"
- 更新工作流文件中的配置
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)
| Label | CPUs | RAM | Disk | $/min |
|---|---|---|---|---|
| 2 | 8 GB | 100 GB | $0.004 |
| 4 | 16 GB | 130 GB | $0.008 |
| 8 | 32 GB | 150 GB | $0.016 |
| 16 | 64 GB | 180 GB | $0.032 |
| 32 | 128 GB | 200 GB | $0.064 |
| 64 | 256 GB | 250 GB | $0.128 |
Ubuntu 22.04 also available: , , etc.
depot-ubuntu-22.04depot-ubuntu-22.04-4| 标签 | CPU核心数 | 内存 | 磁盘 | 单价(美元/分钟) |
|---|---|---|---|---|
| 2 | 8 GB | 100 GB | $0.004 |
| 4 | 16 GB | 130 GB | $0.008 |
| 8 | 32 GB | 150 GB | $0.016 |
| 16 | 64 GB | 180 GB | $0.032 |
| 32 | 128 GB | 200 GB | $0.064 |
| 64 | 256 GB | 250 GB | $0.128 |
Ubuntu 22.04版本同样可用:、等。
depot-ubuntu-22.04depot-ubuntu-22.04-4Ubuntu (ARM — Graviton4)
Ubuntu(ARM — Graviton4)
Same sizes and pricing as Intel. Add suffix:
, , , etc.
-armdepot-ubuntu-24.04-armdepot-ubuntu-24.04-arm-4depot-ubuntu-24.04-arm-8规格和定价与Intel版本一致,添加后缀即可:
、、等。
-armdepot-ubuntu-24.04-armdepot-ubuntu-24.04-arm-4depot-ubuntu-24.04-arm-8Windows Server
Windows Server
| Label | CPUs | RAM | $/min |
|---|---|---|---|
| 2 | 8 GB | $0.008 |
| 4 | 16 GB | $0.016 |
| 8–64 | 32–256 GB | $0.032–$0.256 |
Windows Server 2022 also available: , etc.
Windows limitation: No Hyper-V. Docker does not work on Windows runners.
depot-windows-2022| 标签 | CPU核心数 | 内存 | 单价(美元/分钟) |
|---|---|---|---|
| 2 | 8 GB | $0.008 |
| 4 | 16 GB | $0.016 |
| 8–64 | 32–256 GB | $0.032–$0.256 |
Windows Server 2022版本同样可用:等。
Windows限制: 不支持Hyper-V,Docker无法在Windows运行器上使用。
depot-windows-2022macOS (Apple M2)
macOS(Apple M2)
| Label | CPUs | RAM | $/min |
|---|---|---|---|
| 8 | 24 GB | $0.08 |
| 8 | 24 GB | $0.08 |
macOS is NOT fully elastic — fixed pool with FIFO queuing. Startup plan+ only.
| 标签 | CPU核心数 | 内存 | 单价(美元/分钟) |
|---|---|---|---|
| 8 | 24 GB | $0.08 |
| 8 | 24 GB | $0.08 |
macOS运行器并非完全弹性伸缩——采用固定资源池与FIFO排队机制,仅适用于Startup及以上套餐。
Aliases
别名
depot-ubuntu-latestdepot-windows-latestdepot-macos-latestdepot-ubuntu-latestdepot-windows-latestdepot-macos-latestMigration 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 testyaml
jobs:
build:
# 之前的配置:
# runs-on: ubuntu-latest
# 修改后:
runs-on: depot-ubuntu-24.04-4
steps:
- uses: actions/checkout@v4
- run: npm ci
- run: npm testCommon Mistakes
常见错误
yaml
undefinedyaml
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
undefinedruns-on: depot-ubuntu-24.04-4
undefinedCaching
缓存机制
Actions using the GitHub Actions cache API automatically use Depot Cache — no config changes needed. This includes , , , , and any action using .
actions/cacheactions/setup-nodeactions/setup-pythonactions/setup-java@actions/cachePre-configured build tool caches (zero config on Depot runners):
| Tool | What's pre-configured |
|---|---|
| Turborepo | |
| Bazel | |
| sccache | |
| Maven | |
| Pants | |
| moonrepo | Env vars set — just run |
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/cacheactions/setup-nodeactions/setup-pythonactions/setup-java@actions/cache预配置的构建工具缓存(在Depot运行器上无需额外配置):
| 工具 | 预配置内容 |
|---|---|
| Turborepo | 已设置 |
| Bazel | 已预填充 |
| sccache | 已设置 |
| Maven | 已预填充 |
| Pants | 已配置 |
| moonrepo | 已设置环境变量 — 直接运行 |
缓存特性:仓库级作用域、无分支隔离、加密存储、最高1000 MiB/s的吞吐量、可配置保留时长(7/14/30天)。
如需禁用自动缓存:进入组织设置 → 关闭"允许Actions任务自动连接到Depot Cache"。
Dagger Integration
Dagger集成
yaml
runs-on: depot-ubuntu-latest,dagger=0.15.1Launches 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-latestImportant: OIDC is not supported for Dependabot. Use input with a secret instead.
token:DEPOT_TOKEN在GitHub组织设置中启用"在自托管运行器上运行Dependabot"。任务将自动在运行器上执行。
depot-ubuntu-latest重要提示: Dependabot不支持OIDC,请使用参数并传入密钥替代。
token:DEPOT_TOKENSSH Debugging
SSH调试
yaml
steps:
- uses: actions/checkout@v4
- uses: mxschmitt/action-tmate@v3
- run: npm testyaml
steps:
- uses: actions/checkout@v4
- uses: mxschmitt/action-tmate@v3
- run: npm testTroubleshooting
故障排查
| Error | Fix |
|---|---|
| "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 |
| Workflows not starting | Verify single runner label; check runner group allows the repo; verify Depot GitHub App permissions |
| Stuck workflows | Force cancel via GitHub API: |
| 错误信息 | 解决方法 |
|---|---|
| "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 GitHub应用的权限 |
| 工作流卡住 | 通过GitHub API强制取消: |