Loading...
Loading...
Compare original and translation side by side
undefinedundefinedundefinedundefined| Type | Scope | Created Via | Use Case |
|---|---|---|---|
| User token | All projects in all user's orgs | | Local development |
| Project token | Single project | Project Settings | CI environments |
| Org API token | Single organization | Org Settings → API Tokens | API access, automation |
| OIDC trust | Single project (short-lived) | Project Settings → Trust Relationships | CI without static secrets (preferred) |
| 类型 | 适用范围 | 创建方式 | 使用场景 |
|---|---|---|---|
| 用户令牌 | 用户所有组织中的全部项目 | | 本地开发 |
| 项目令牌 | 单个项目 | 项目设置 | CI环境 |
| 组织API令牌 | 单个组织 | 组织设置 → API令牌 | API访问、自动化 |
| OIDC信任 | 单个项目(短期有效) | 项目设置 → 信任关系 | 无需静态密钥的CI场景(推荐) |
--tokendepot loginDEPOT_TOKEN--tokendepot loginDEPOT_TOKENdepot login # Interactive browser login
depot login --org-id 1234567890 # Specify org
depot login --clear # Clear existing token first
depot logout # Remove saved tokendepot login # 交互式浏览器登录
depot login --org-id 1234567890 # 指定组织
depot login --clear # 先清除现有令牌
depot logout # 删除已保存的令牌| CI Provider | Configuration |
|---|---|
| GitHub Actions | GitHub org/user name + repository name. Requires |
| CircleCI | Organization UUID + Project UUID (must use UUIDs, not friendly names) |
| Buildkite | Organization slug + Pipeline slug |
| RWX | Vault subject |
| CI提供商 | 配置方式 |
|---|---|
| GitHub Actions | GitHub组织/用户名 + 仓库名称。工作流中需要配置 |
| CircleCI | 组织UUID + 项目UUID(必须使用UUID,而非友好名称) |
| Buildkite | 组织Slug + 流水线Slug |
| RWX | Vault主题 |
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write # Required for OIDC
steps:
- uses: actions/checkout@v4
- uses: depot/setup-action@v1
- uses: depot/build-push-action@v1
with:
project: <project-id>
push: true
tags: myrepo/app:latestjobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write # OIDC必填
steps:
- uses: actions/checkout@v4
- uses: depot/setup-action@v1
- uses: depot/build-push-action@v1
with:
project: <project-id>
push: true
tags: myrepo/app:lateststeps:
- uses: depot/setup-action@v1
- uses: depot/build-push-action@v1
with:
project: <project-id>
token: ${{ secrets.DEPOT_TOKEN }}steps:
- uses: depot/setup-action@v1
- uses: depot/build-push-action@v1
with:
project: <project-id>
token: ${{ secrets.DEPOT_TOKEN }}docker login registry.depot.dev -u x-token -p <any-depot-token>docker login registry.depot.dev -u x-token -p <any-depot-token>undefinedundefinedundefinedundefinedundefinedundefineddepot init{"id": "PROJECT_ID"}depot.json--project <id>DEPOT_PROJECT_IDdepot init{"id": "PROJECT_ID"}depot.json--project <id>DEPOT_PROJECT_IDdepot org list # List orgs (supports --output json/csv)
depot org switch [org-id] # Set current org
depot org show # Show current org IDdepot org list # 列出组织(支持--output json/csv格式)
depot org switch [org-id] # 切换当前组织
depot org show # 显示当前组织ID| Variable | Description |
|---|---|
| Auth token (user, project, or org) |
| Project ID (alternative to |
| Suppress build links and update notices (useful in CI) |
| Custom CLI install directory |
| Disable OpenTelemetry tracing |
| 变量名称 | 说明 |
|---|---|
| 认证令牌(用户、项目或组织级别) |
| 项目ID(替代 |
| 禁用构建链接和更新通知(CI场景适用) |
| 自定义CLI安装目录 |
| 禁用OpenTelemetry追踪 |
undefinedundefinedundefinedundefined| Action | Purpose |
|---|---|
| Install |
| Drop-in for |
| Drop-in for |
| Set Depot as default Docker Buildx builder |
| Pull from Depot Registry |
| Action | 用途 |
|---|---|
| 安装 |
| |
| |
| 将Depot设置为默认Docker Buildx构建器 |
| 从Depot镜像仓库拉取镜像 |
@depot/sdk-nodedepot/depot-goimport {depot} from '@depot/sdk-node'
const headers = { Authorization: `Bearer ${process.env.DEPOT_TOKEN}` }
// List projects
const result = await depot.core.v1.ProjectService.listProjects({}, {headers})
// Create a build
const build = await depot.build.v1.BuildService.createBuild(
{projectId: '<id>'}, {headers}
)@depot/sdk-nodedepot/depot-goimport {depot} from '@depot/sdk-node'
const headers = { Authorization: `Bearer ${process.env.DEPOT_TOKEN}` }
// 列出项目
const result = await depot.core.v1.ProjectService.listProjects({}, {headers})
// 创建构建任务
const build = await depot.build.v1.BuildService.createBuild(
{projectId: '<id>'}, {headers}
)| Plan | Cost | Build Minutes | Cache | Runners |
|---|---|---|---|---|
| Developer | $20/mo | 2,000/mo | 25 GB | Linux, Windows |
| Startup | $200/mo | 20,000/mo + $0.004/min | 250 GB | Linux, Windows, macOS |
| Business | Custom | Custom | Custom | All + GPU |
| 方案 | 费用 | 构建时长 | 缓存 | 运行器 |
|---|---|---|---|---|
| 开发者版 | $20/月 | 2000分钟/月 | 25 GB | Linux、Windows |
| 创业版 | $200/月 | 20000分钟/月 + $0.004/分钟 | 250 GB | Linux、Windows、macOS |
| 企业版 | 定制 | 定制 | 定制 | 全部类型 + GPU |