name: Pre-commit # Runs the repo-wide lint/format/secret checks via `task pre-commit`. # Called from build.yml on PRs and merge_group; also runnable on demand via workflow_dispatch. on: workflow_call: workflow_dispatch: permissions: contents: read jobs: pre-commit: runs-on: ubuntu-latest steps: - name: Harden Runner uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 with: egress-policy: audit - name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: fetch-depth: 0 persist-credentials: false - name: Install uv uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0 with: enable-cache: true cache-suffix: pre-commit - name: Install Task uses: go-task/setup-task@3be4020d41929789a01026e0e427a4321ce0ad44 # v2.0.0 - name: Run pre-commit checks run: task pre-commit