Skip to content

Commit ee84868

Browse files
author
Test User
committed
fix(ci): unify cross-repo dispatch on TERRAPHIM_ORG_GITHUB_TOKEN
Prefer org PAT secret with legacy fallbacks for desktop and clients workflow dispatch. Document secret aliases in release runbook.
1 parent a5bbd8f commit ee84868

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

.github/workflows/release-comprehensive.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ jobs:
484484
uses: actions/github-script@v9
485485
continue-on-error: true
486486
with:
487-
github-token: ${{ secrets.DESKTOP_REPO_TOKEN }}
487+
github-token: ${{ secrets.TERRAPHIM_ORG_GITHUB_TOKEN || secrets.DESKTOP_REPO_TOKEN }}
488488
script: |
489489
const tag = context.ref.replace('refs/tags/', '');
490490
console.log(`Triggering desktop release for tag: ${tag}`);
@@ -511,9 +511,9 @@ jobs:
511511
- name: Dispatch terraphim-clients release-binaries workflow
512512
uses: actions/github-script@v9
513513
with:
514-
# Org-level PAT (same secret as desktop dispatch). GITHUB_TOKEN cannot
514+
# Org-level PAT for cross-repo workflow dispatch. GITHUB_TOKEN cannot
515515
# dispatch workflows in other repos regardless of job permissions.
516-
github-token: ${{ secrets.DESKTOP_REPO_TOKEN }}
516+
github-token: ${{ secrets.TERRAPHIM_ORG_GITHUB_TOKEN || secrets.DESKTOP_REPO_TOKEN || secrets.CLIENTS_REPO_TOKEN }}
517517
script: |
518518
const version = context.ref.replace('refs/tags/v', '');
519519
const releaseTag = context.ref.replace('refs/tags/', '');

docs/runbooks/release.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,13 @@ Do **not** force-push tags. Fix workflows, bump to next patch (e.g. v1.20.4 →
119119
| Secret | Repo | Purpose |
120120
|--------|------|---------|
121121
| `CARGO_REGISTRIES_TERRAPHIM_TOKEN` | terraphim-clients | Private registry during build |
122-
| `DESKTOP_REPO_TOKEN` | terraphim-ai (org PAT) | Cross-repo workflow dispatch (desktop + clients) |
122+
| `TERRAPHIM_ORG_GITHUB_TOKEN` | terraphim-ai (org PAT) | Cross-repo workflow dispatch (desktop + clients) |
123+
| `DESKTOP_REPO_TOKEN` | terraphim-ai | Legacy alias — same value as `TERRAPHIM_ORG_GITHUB_TOKEN` |
124+
| `CLIENTS_REPO_TOKEN` | terraphim-ai | Legacy alias — same value as `TERRAPHIM_ORG_GITHUB_TOKEN` |
123125
| `TERRAPHIM_AI_RELEASE_TOKEN` | terraphim-clients (org PAT) | Upload client binaries to terraphim-ai release |
124126
| `OP_SERVICE_ACCOUNT_TOKEN` | terraphim-ai, terraphim-clients | macOS signing via 1Password |
125127

126-
`DESKTOP_REPO_TOKEN` and `TERRAPHIM_AI_RELEASE_TOKEN` should be the same org-level
127-
fine-grained PAT (or classic PAT) with `actions:write` and `contents:write` on
128-
`terraphim/*` repos. The per-job `GITHUB_TOKEN` cannot replace them for cross-repo calls.
128+
`TERRAPHIM_ORG_GITHUB_TOKEN`, `DESKTOP_REPO_TOKEN`, `CLIENTS_REPO_TOKEN`, and
129+
`TERRAPHIM_AI_RELEASE_TOKEN` should share one org-level fine-grained PAT (or classic
130+
PAT) with `actions:write` and `contents:write` on `terraphim/*` repos. The per-job
131+
`GITHUB_TOKEN` cannot replace them for cross-repo calls.

0 commit comments

Comments
 (0)