Skip to content

Commit a5bbd8f

Browse files
author
Test User
committed
fix(ci): use org PAT for terraphim-clients workflow dispatch Refs #2706
CLIENTS_REPO_TOKEN was never configured; fallback GITHUB_TOKEN cannot dispatch cross-repo (403). Reuse DESKTOP_REPO_TOKEN org PAT, same as desktop release trigger.
1 parent 5928567 commit a5bbd8f

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

.github/workflows/release-comprehensive.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,9 @@ jobs:
511511
- name: Dispatch terraphim-clients release-binaries workflow
512512
uses: actions/github-script@v9
513513
with:
514-
github-token: ${{ secrets.CLIENTS_REPO_TOKEN || secrets.GITHUB_TOKEN }}
514+
# Org-level PAT (same secret as desktop dispatch). GITHUB_TOKEN cannot
515+
# dispatch workflows in other repos regardless of job permissions.
516+
github-token: ${{ secrets.DESKTOP_REPO_TOKEN }}
515517
script: |
516518
const version = context.ref.replace('refs/tags/v', '');
517519
const releaseTag = context.ref.replace('refs/tags/', '');

docs/runbooks/release.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@ 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-
| `CLIENTS_REPO_TOKEN` | terraphim-ai | Dispatch clients workflow |
123-
| `TERRAPHIM_AI_RELEASE_TOKEN` | terraphim-clients | Upload binaries to terraphim-ai release |
124-
| `OP_SERVICE_ACCOUNT_TOKEN` | terraphim-ai, terraphim-clients | macOS signing via 1Password |
122+
| `DESKTOP_REPO_TOKEN` | terraphim-ai (org PAT) | Cross-repo workflow dispatch (desktop + clients) |
123+
| `TERRAPHIM_AI_RELEASE_TOKEN` | terraphim-clients (org PAT) | Upload client binaries to terraphim-ai release |
124+
| `OP_SERVICE_ACCOUNT_TOKEN` | terraphim-ai, terraphim-clients | macOS signing via 1Password |
125+
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.

0 commit comments

Comments
 (0)