Files
romm/.github/workflows/trunk-check.yml
Georges-Antoine Assi cdbc33f65f chore(ci): scope workflow permissions to what each job actually uses
`read-all` grants the token read on every scope, not just the one a job
needs, so replace it with `contents: read`. The job-level `checks: write` and
`pull-requests: write` in typecheck, pytest and migrations were writes no
step makes; trunk-check keeps `checks: write` for its annotations, and
update-hltb-api-url moves its write scopes down to the job that opens the PR.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-17 13:08:16 -04:00

27 lines
589 B
YAML

name: Run Trunk Check
on:
pull_request:
push:
branches:
- "master"
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
jobs:
trunk_check:
runs-on: ubuntu-latest
permissions:
checks: write # For trunk to post annotations
contents: read # For repo checkout
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Trunk Check
uses: trunk-io/trunk-action@e1234e67a86010d61ddac8d8ebf4b783e2ffd2fa # v2.0.0