Skip to content

Commit 0dd0fb0

Browse files
authored
ci: scope the role-permissions token to saas-proto (#5021)
The Update Custom Role Permissions workflow has failed on every run since it was added in #4293 (6 of 6 scheduled runs, starting 2026-06-29). It fetches protogen/custom_role_permissions.json from the private saas-proto repo, and every run failed with: Error: HTTP 404: {"message":"Not Found", ...} The 404 is misleading. The file exists at that path. The problem is that create-github-app-token scopes the token to the current repository when neither owner nor repositories is set, so the token cannot see saas-proto, and GitHub returns 404 rather than 403 for private repos a token cannot see. Set owner and repositories so the token covers both repos. This matches what temporalio/cli does in trigger-docs.yml when it dispatches into this repo. Requires the temporal-cicd app to be installed on saas-proto with Contents: read. If it is not, token generation now fails with an explicit "app not installed" error instead of a phantom 404.
1 parent 6c5baf9 commit 0dd0fb0

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

.github/workflows/update-custom-role-permissions.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@ jobs:
2020
with:
2121
app-id: ${{ secrets.TEMPORAL_CICD_APP_ID }}
2222
private-key: ${{ secrets.TEMPORAL_CICD_PRIVATE_KEY }}
23+
# Without owner/repositories the token is scoped to this repo only, so
24+
# reading custom_role_permissions.json from the private saas-proto repo
25+
# returns 404 (GitHub hides private repos a token cannot see rather
26+
# than returning 403). documentation must stay in the list because the
27+
# later steps push a branch and open the PR with this same token.
28+
owner: temporalio
29+
repositories: |
30+
documentation
31+
saas-proto
2332
2433
- name: Checkout docs repo
2534
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

0 commit comments

Comments
 (0)