Skip to content

Commit 5136b32

Browse files
committed
fix(ci): pass GITHUB_TOKEN to Build CLI step to bypass anonymous quota
scripts/download-assets.mts (via packages/build-infra/lib/github-releases.mts) queries the GitHub releases API for binject / node-smol / iocraft during the cli build. The script reads GH_TOKEN / GITHUB_TOKEN to authenticate, but the Build CLI step in both unit-tests and e2e jobs never set either, so calls went out anonymously, hit the 60-req/hr public quota, and returned 403 ("Failed to fetch releases: 403"). Expose secrets.GITHUB_TOKEN to both Build CLI steps. Authenticated calls share a 1000-req/hr per-job bucket. permissions: contents: read is already declared on both jobs, which is what the asset reads need.
1 parent 7af5ef4 commit 5136b32

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,13 @@ jobs:
242242
- name: Build CLI
243243
working-directory: packages/cli
244244
shell: bash
245+
env:
246+
# download-assets.mts hits the GitHub releases API for
247+
# binject / node-smol / iocraft. Anonymous calls share the
248+
# 60-req/hr public quota and get 403 once exhausted; the
249+
# auto-provided GITHUB_TOKEN gives this job its own 1000/hr
250+
# bucket.
251+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
245252
run: |
246253
pnpm run build
247254
@@ -318,6 +325,13 @@ jobs:
318325
- name: Build CLI
319326
working-directory: packages/cli
320327
shell: bash
328+
env:
329+
# download-assets.mts hits the GitHub releases API for
330+
# binject / node-smol / iocraft. Anonymous calls share the
331+
# 60-req/hr public quota and get 403 once exhausted; the
332+
# auto-provided GITHUB_TOKEN gives this job its own 1000/hr
333+
# bucket.
334+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
321335
run: |
322336
pnpm run build
323337

0 commit comments

Comments
 (0)