Skip to content

Commit a1075c2

Browse files
stroland02claude
andcommitted
fix: give the specification fetch the token gh demands inside Actions
`fetch_measurement_inputs.py` reads the pinned Stripe documents through the `gh` CLI, because both are larger than the 1 MB ceiling GitHub puts on the base64 `.content` field and only the raw endpoint returns them whole. Inside a workflow `gh` refuses to run at all without `GH_TOKEN`, public repository or not, so the step this landed with failed on its first run with `To use GitHub CLI in a GitHub Actions workflow, set the GH_TOKEN environment variable`. The workflow's own token covers it: the read is `stripe/openapi` at a pinned tag and the job holds read permissions only. Scoped to the one step rather than the job, so nothing else acquires a credential it has no use for. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent da6a820 commit a1075c2

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,11 @@ jobs:
142142
# Both scripts verify what they write before writing it: a git blob hash per specification,
143143
# and the pinned digest for the map. Neither can quietly substitute an input.
144144
- name: Stage the pinned Stripe specifications
145+
# `gh_raw` shells out to the `gh` CLI, which refuses to run inside Actions without
146+
# `GH_TOKEN` even against a public repository. The workflow's own token is enough:
147+
# this reads `stripe/openapi` at a pinned tag, and the job's permissions are read-only.
148+
env:
149+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
145150
run: uv run python scripts/fetch_measurement_inputs.py
146151

147152
- name: Stage the pinned symbol map

0 commit comments

Comments
 (0)