mirror of
https://github.com/wiltodelta/remove-ai-watermarks.git
synced 2026-10-14 21:40:47 +02:00
Authenticate C2PA registry-sync GitHub API calls to fix CI rate-limiting
scripts/sync_c2pa_soft_bindings.py --check hits api.github.com to resolve the latest upstream commit SHA, unauthenticated. That endpoint's 60/hour rate limit is per source IP, which GitHub Actions runners exhaust fast since many workflows share the runner IP pool -- this was failing the lint job with "403: rate limit exceeded" on every push regardless of whether the change touched anything related. Send an Authorization: Bearer header built from GITHUB_TOKEN/GH_TOKEN when set, scoped to api.github.com only (raw.githubusercontent.com is a separate, much higher-limit CDN and doesn't need it). Wire the workflow's own GITHUB_TOKEN secret into that step's env so CI actually has one to send, raising the limit to 5000/hour. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
be8f24c7cb
commit
e3bbe88155
3 files changed
+49
-1
No files matched your search
@@ -21,6 +21,8 @@ jobs:
|
||||
- name: Sync dev environment
|
||||
run: uv sync --frozen --extra dev
|
||||
- name: Check C2PA soft-binding registry snapshot
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: uv run python scripts/sync_c2pa_soft_bindings.py --check
|
||||
- name: Ruff lint
|
||||
run: uv run ruff check
|
||||
|
||||
Reference in new issue
Block a user