Skip to content

Commit 683909c

Browse files
ci(deploy): use REPO_ACCESS_TOKEN for sibling-repo checkouts
The first auto-deploy run on 2026-05-15T06:28Z failed because GITHUB_TOKEN is auto-scoped to the current repo only — fetching the private sibling repos (common, proto) returned 404 from the GH API. Swap both Checkout steps to use REPO_ACCESS_TOKEN, a fine-grained PAT with read access to those siblings. Operator action that made this work: `gh secret set REPO_ACCESS_TOKEN --repo InstaNode-dev/<this-repo>`. The ghcr.io docker login step still uses GITHUB_TOKEN — packages:write is implicit on the current repo's token, no PAT needed there. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 21ccbb3 commit 683909c

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,18 @@ jobs:
5656
uses: actions/checkout@v4
5757
with:
5858
repository: ${{ vars.COMMON_REPO || format('{0}/common', github.repository_owner) }}
59-
token: ${{ secrets.GITHUB_TOKEN }}
59+
# 2026-05-15: GITHUB_TOKEN is scoped to THIS repo only and 404s
60+
# on private sibling repos in the same org. REPO_ACCESS_TOKEN
61+
# is a fine-grained PAT with read access to
62+
# InstaNode-dev/{common,proto}.
63+
token: ${{ secrets.REPO_ACCESS_TOKEN }}
6064
path: common
6165

6266
- name: Checkout proto sibling into ./proto
6367
uses: actions/checkout@v4
6468
with:
6569
repository: ${{ vars.PROTO_REPO || format('{0}/proto', github.repository_owner) }}
66-
token: ${{ secrets.GITHUB_TOKEN }}
70+
token: ${{ secrets.REPO_ACCESS_TOKEN }}
6771
path: proto
6872

6973
- name: Compute build metadata

0 commit comments

Comments
 (0)