fix: use GitHub App token for token count workflow

Switches from default GITHUB_TOKEN to a scoped GitHub App token
so the workflow can push to the protected main branch.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
gavrielc
2026-02-15 17:11:39 +02:00
parent 9261a25531
commit e4d77cdba0

View File

@@ -5,14 +5,19 @@ on:
branches: [main] branches: [main]
paths: ['src/**', 'container/**', 'launchd/**', 'CLAUDE.md'] paths: ['src/**', 'container/**', 'launchd/**', 'CLAUDE.md']
permissions:
contents: write
jobs: jobs:
update-tokens: update-tokens:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token }}
- uses: actions/setup-python@v5 - uses: actions/setup-python@v5
with: with: