depot-ci
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDepot CI (Beta)
Depot CI (Beta)
Depot CI is a drop-in replacement for GitHub Actions that runs your existing Actions-format YAML workflows entirely within Depot's infrastructure. It parses GitHub Actions workflow files and executes them on Depot's compute.
Status: Beta — keep GitHub Actions running in parallel. Things may break.
Depot CI是GitHub Actions的即插即用替代方案,可在Depot的基础设施内完整运行您现有的Actions格式YAML工作流。它会解析GitHub Actions工作流文件,并在Depot的计算资源上执行。
状态:Beta版 — 请保持GitHub Actions并行运行。可能会出现问题。
Architecture
架构
Three subsystems: compute (provisions and executes work), orchestrator (schedules multi-step workflows, handles dependencies), GitHub Actions parser (translates Actions YAML into orchestrator workflows). The system is fully programmable — direct API access to workflows, orchestration, and compute sandboxes is planned.
包含三个子系统:计算层(提供并执行工作任务)、编排器(调度多步骤工作流、处理依赖关系)、GitHub Actions解析器(将Actions YAML转换为编排器可执行的工作流)。该系统完全可编程——计划提供对工作流、编排和计算沙箱的直接API访问。
Getting Started
快速开始
1. Install the Depot Code Access GitHub App
1. 安装Depot Code Access GitHub应用
Depot dashboard → Settings → GitHub Code Access → Connect to GitHub
(If you've used Claude Code on Depot, this may already be installed.)
登录Depot控制台 → 设置 → GitHub代码访问 → 连接到GitHub
(如果您已经在Depot上使用过Claude Code,该应用可能已安装。)
2. Migrate workflows
2. 迁移工作流
bash
depot ci migrateThis interactive wizard:
- Discovers all workflows in
.github/workflows/ - Analyzes each for Depot CI compatibility
- Copies selected workflows to
.depot/workflows/ - Copies local actions from to
.github/actions/.depot/actions/ - Prompts for secrets and variables referenced in workflows
Your directory is untouched — workflows run in both GitHub and Depot simultaneously.
.github/Warning: Workflows that cause side effects (deploys, artifact updates) will execute twice.
bash
depot ci migrate这个交互式向导会:
- 发现目录下的所有工作流
.github/workflows/ - 分析每个工作流与Depot CI的兼容性
- 将选中的工作流复制到目录
.depot/workflows/ - 将本地动作从复制到
.github/actions/目录.depot/actions/ - 提示输入工作流中引用的密钥和变量
您的目录不会被修改——工作流会同时在GitHub和Depot上运行。
.github/警告: 会产生副作用的工作流(如部署、更新制品)将执行两次。
Non-interactive migration
非交互式迁移
bash
depot ci migrate --yes \
--secret NPM_TOKEN=npm_abc123 \
--secret DATABASE_URL=postgres://... \
--var SERVICE_NAME=api \
--org my-org-idbash
depot ci migrate --yes \
--secret NPM_TOKEN=npm_abc123 \
--secret DATABASE_URL=postgres://... \
--var SERVICE_NAME=api \
--org my-org-idMigrate flags
迁移参数
| Flag | Description |
|---|---|
| Non-interactive, migrate all workflows |
| Pre-supply secret (repeatable) |
| Pre-supply variable (repeatable) |
| Overwrite existing |
| Organization ID (required if multiple orgs) |
| Depot API token |
| 参数 | 描述 |
|---|---|
| 非交互式模式,迁移所有工作流 |
| 预先提供密钥(可重复使用) |
| 预先提供变量(可重复使用) |
| 覆盖现有的 |
| 组织ID(当存在多个组织时为必填项) |
| Depot API令牌 |
3. Manual setup (without migrate command)
3. 手动设置(不使用migrate命令)
Create and directories manually. Copy workflow files from . Configure secrets via CLI or API.
.depot/workflows/.depot/actions/.github/workflows/手动创建和目录。将工作流文件从复制过来。通过CLI或API配置密钥。
.depot/workflows/.depot/actions/.github/workflows/Managing Secrets
管理密钥
bash
undefinedbash
undefinedAdd (prompts for value securely if --value omitted)
添加密钥(如果省略--value则安全地提示输入值)
depot ci secrets add SECRET_NAME
depot ci secrets add SECRET_NAME --value "my-secret-value" --description "NPM auth token"
depot ci secrets add SECRET_NAME
depot ci secrets add SECRET_NAME --value "my-secret-value" --description "NPM认证令牌"
List (names and metadata only, no values)
列出密钥(仅显示名称和元数据,不显示值)
depot ci secrets list
depot ci secrets list --output json
depot ci secrets list
depot ci secrets list --output json
Remove
删除密钥
depot ci secrets remove SECRET_NAME
depot ci secrets remove SECRET_NAME --force # Skip confirmation
undefineddepot ci secrets remove SECRET_NAME
depot ci secrets remove SECRET_NAME --force # 跳过确认
undefinedSecrets via API
通过API管理密钥
bash
curl -X POST https://api.depot.dev/depot.ci.v1.SecretService/AddSecret \
-H "Authorization: Bearer ${DEPOT_TOKEN}" \
-H "Content-Type: application/json" \
-d '{"name": "NPM_TOKEN", "value": "npm_abc123..."}'bash
curl -X POST https://api.depot.dev/depot.ci.v1.SecretService/AddSecret \
-H "Authorization: Bearer ${DEPOT_TOKEN}" \
-H "Content-Type: application/json" \
-d '{"name": "NPM_TOKEN", "value": "npm_abc123..."}'Batch add
批量添加密钥
curl -X POST https://api.depot.dev/depot.ci.v1.SecretService/BatchAddSecrets
-H "Authorization: Bearer ${DEPOT_TOKEN}"
-H "Content-Type: application/json"
-d '{"secrets": [{"name": "NPM_TOKEN", "value": "npm_abc123..."}, {"name": "DB_PASS", "value": "secret"}]}'
-H "Authorization: Bearer ${DEPOT_TOKEN}"
-H "Content-Type: application/json"
-d '{"secrets": [{"name": "NPM_TOKEN", "value": "npm_abc123..."}, {"name": "DB_PASS", "value": "secret"}]}'
undefinedcurl -X POST https://api.depot.dev/depot.ci.v1.SecretService/BatchAddSecrets
-H "Authorization: Bearer ${DEPOT_TOKEN}"
-H "Content-Type: application/json"
-d '{"secrets": [{"name": "NPM_TOKEN", "value": "npm_abc123..."}, {"name": "DB_PASS", "value": "secret"}]}'
-H "Authorization: Bearer ${DEPOT_TOKEN}"
-H "Content-Type: application/json"
-d '{"secrets": [{"name": "NPM_TOKEN", "value": "npm_abc123..."}, {"name": "DB_PASS", "value": "secret"}]}'
undefinedManaging Variables
管理变量
Non-secret config values accessible as . Unlike secrets, values can be read back.
${{ vars.VARIABLE_NAME }}bash
depot ci vars add VAR_NAME --value "some-value"
depot ci vars list
depot ci vars list --output json
depot ci vars remove VAR_NAME
depot ci vars remove VAR_NAME --force非保密的配置值,可通过访问。与密钥不同,变量值可以被读取。
${{ vars.VARIABLE_NAME }}bash
depot ci vars add VAR_NAME --value "some-value"
depot ci vars list
depot ci vars list --output json
depot ci vars remove VAR_NAME
depot ci vars remove VAR_NAME --forceRunning Workflows
运行工作流
bash
undefinedbash
undefinedRun a workflow
运行工作流
depot ci run --workflow .depot/workflows/ci.yml
depot ci run --workflow .depot/workflows/ci.yml
Run specific jobs only
仅运行指定任务
depot ci run --workflow .depot/workflows/ci.yml --job build --job test
depot ci run --workflow .depot/workflows/ci.yml --job build --job test
Debug with SSH (tmate session after step N, requires single --job)
通过SSH调试(在第N步后启动tmate会话,需指定单个--job)
depot ci run --workflow .depot/workflows/ci.yml --job build --ssh-after-step 3
The CLI auto-detects uncommitted changes vs. the default branch, uploads a patch to Depot Cache, and injects a step to apply it after checkout — your local working state runs without needing a push.depot ci run --workflow .depot/workflows/ci.yml --job build --ssh-after-step 3
CLI会自动检测未提交的更改与默认分支的差异,将补丁上传到Depot缓存,并注入一个步骤在检出后应用补丁——无需推送即可运行本地工作状态。Checking Status and Logs
检查状态和日志
bash
undefinedbash
undefinedCheck run status (shows workflows → jobs → attempts hierarchy)
检查运行状态(显示工作流→任务→尝试的层级结构)
depot ci status <run-id>
depot ci status <run-id>
Fetch logs for a specific job attempt
获取特定任务尝试的日志
depot ci logs <attempt-id>
undefineddepot ci logs <attempt-id>
undefinedCompatibility with GitHub Actions
与GitHub Actions的兼容性
Supported
已支持特性
Workflow level: , , , , , , (with inputs, outputs, secrets)
namerun-nameonenvdefaultsjobson.workflow_callTriggers: (branches, tags, paths), (branches, paths), , , , (with inputs),
pushpull_requestpull_request_targetscheduleworkflow_callworkflow_dispatchworkflow_runJob level: , , , , , , , (matrix, fail-fast, max-parallel), , , , (reusable workflows), , , ,
nameneedsifoutputsenvdefaultstimeout-minutesstrategycontinue-on-errorcontainerservicesuseswithsecretssecrets.inheritstepsStep level: , , , , , , , , , ,
idnameifusesrunshellwithenvworking-directorycontinue-on-errortimeout-minutesExpressions: , , , , , , , , , , contexts. Functions: , , , , , , , , , ,
githubenvvarssecretsneedsstrategymatrixstepsjobrunnerinputsalways()success()failure()cancelled()contains()startsWith()endsWith()format()join()toJSON()fromJSON()Action types: JavaScript (Node 12/16/20/24), Composite, Docker
工作流层面: 、、、、、、(包含输入、输出、密钥)
namerun-nameonenvdefaultsjobson.workflow_call触发器: (分支、标签、路径)、(分支、路径)、、、、(包含输入)、
pushpull_requestpull_request_targetscheduleworkflow_callworkflow_dispatchworkflow_run任务层面: 、、、、、、、(矩阵、快速失败、最大并行数)、、、、(可复用工作流)、、、、
nameneedsifoutputsenvdefaultstimeout-minutesstrategycontinue-on-errorcontainerservicesuseswithsecretssecrets.inheritsteps步骤层面: 、、、、、、、、、、
idnameifusesrunshellwithenvworking-directorycontinue-on-errortimeout-minutes表达式: 、、、、、、、、、、上下文。函数:、、、、、、、、、、
githubenvvarssecretsneedsstrategymatrixstepsjobrunnerinputsalways()success()failure()cancelled()contains()startsWith()endsWith()format()join()toJSON()fromJSON()动作类型: JavaScript(Node 12/16/20/24)、复合动作、Docker动作
In Progress
开发中特性
concurrencyhashFiles()permissionsactionscheckscontentsmetadatapull_requestsstatusesworkflowsid-tokenconcurrencyhashFiles()permissionsactionscheckscontentsmetadatapull_requestsstatusesworkflowsid-tokenNot Supported
未支持特性
- Reusable workflows from other repositories — local reusable workflows work; cross-repo does not
uses - Fork-triggered PRs — and
pull_requestfrom forks not supported yetpull_request_target - Non-Ubuntu runner labels — all non-Depot labels treated as
depot-ubuntu-latest - OIDC — permission not available yet
id-token - Concurrency groups — not yet implemented
- Hierarchical secrets/variables — scoped to org only, cannot vary per-repository
- Custom runner snapshots — Depot's own implementation planned
- Many GitHub-specific event triggers — ,
release,issues,issue_comment,deployment,create,delete, and othersmerge_group
- 跨仓库可复用工作流 —— 本地可复用工作流可用;跨仓库不支持
uses - 分支触发的PR —— 暂不支持来自分支的和
pull_requestpull_request_target - 非Ubuntu运行器标签 —— 所有非Depot标签都被视为
depot-ubuntu-latest - OIDC —— 暂不支持权限
id-token - 并发组 —— 尚未实现
- 层级化密钥/变量 —— 仅支持组织范围,无法按仓库区分
- 自定义运行器快照 —— Depot自有实现正在规划中
- 许多GitHub特定事件触发器 —— 、
release、issues、issue_comment、deployment、create、delete等merge_group
Runner label handling
运行器标签处理
Depot CI respects Depot runner labels (e.g., ). Any label it can't parse is treated as .
depot-ubuntu-24.04-8depot-ubuntu-latestDepot CI支持Depot运行器标签(如)。任何无法解析的标签都会被视为。
depot-ubuntu-24.04-8depot-ubuntu-latestDirectory Structure
目录结构
your-repo/
├── .github/
│ ├── workflows/ # Original GHA workflows (keep running)
│ └── actions/ # Local composite actions
├── .depot/
│ ├── workflows/ # Depot CI copies of workflows
│ └── actions/ # Depot CI copies of local actionsyour-repo/
├── .github/
│ ├── workflows/ # 原始GHA工作流(保持运行)
│ └── actions/ # 本地复合动作
├── .depot/
│ ├── workflows/ # Depot CI工作流副本
│ └── actions/ # Depot CI本地动作副本Common Mistakes
常见错误
| Mistake | Fix |
|---|---|
Removing | Keep them — run both in parallel during beta |
| Using cross-repo reusable workflows | Not supported yet — inline the workflow or copy it locally |
| Expecting OIDC to work | Not supported yet — use |
| Setting per-repo secrets | Secrets are org-scoped only — same value across all repos |
Forgetting | Migration will fail — always specify |
Workflows with | Treated as |
| 错误 | 修复方案 |
|---|---|
迁移后删除 | 保留该目录——Beta阶段请保持两者并行运行 |
| 使用跨仓库可复用工作流 | 暂不支持——将工作流内联或本地复制 |
| 期望OIDC正常工作 | 暂不支持——使用 |
| 设置仓库级别的密钥 | 密钥仅支持组织范围——所有仓库使用相同值 |
多组织场景下忘记 | 迁移会失败——请始终指定 |
工作流使用 | 会被视为 |