66 - opened
77 - synchronize
88
9+ permissions : {}
10+
911env :
1012 # Forks and Dependabot don't have access to secrets
1113 HAS_SECRETS : ${{ secrets.PRE_COMMIT != '' }}
1214
1315jobs :
1416 pre-commit :
1517 runs-on : ubuntu-latest
18+ timeout-minutes : 5
1619 steps :
1720 - name : Dump GitHub context
1821 env :
2831 # And it needs the full history to be able to compute diffs
2932 fetch-depth : 0
3033 # A token other than the default GITHUB_TOKEN is needed to be able to trigger CI
31- token : ${{ secrets.PRE_COMMIT }}
34+ token : ${{ secrets.PRE_COMMIT }} # zizmor: ignore[secrets-outside-env]
35+ persist-credentials : true # Required for `git push` command
3236 # pre-commit lite ci needs the default checkout configs to work
3337 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3438 name : Checkout PR for fork
@@ -37,21 +41,25 @@ jobs:
3741 # To be able to commit it needs the head branch of the PR, the remote one
3842 ref : ${{ github.event.pull_request.head.sha }}
3943 fetch-depth : 0
44+ persist-credentials : false
4045 - name : Set up Python
4146 uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
4247 with :
4348 python-version-file : " .python-version"
4449 - name : Setup uv
4550 uses : astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
4651 with :
52+ # Before upgrading uv version, make sure astral-sh/setup-uv knows its checksum.
53+ # See: https://github.com/astral-sh/setup-uv/issues/851#issuecomment-4282017837
54+ version : " 0.11.4"
4755 cache-dependency-glob : |
4856 pyproject.toml
4957 uv.lock
5058 - name : Install Dependencies
5159 run : uv sync --locked --extra standard
5260 - name : Run prek - pre-commit
5361 id : precommit
54- run : uvx prek run --from-ref origin/${GITHUB_BASE_REF} --to-ref HEAD --show-diff-on-failure
62+ run : uv run prek run --from-ref origin/${GITHUB_BASE_REF} --to-ref HEAD --show-diff-on-failure
5563 continue-on-error : true
5664 - name : Commit and push changes
5765 if : env.HAS_SECRETS == 'true'
7987 needs :
8088 - pre-commit
8189 runs-on : ubuntu-latest
90+ timeout-minutes : 5
8291 steps :
8392 - name : Dump GitHub context
8493 env :
0 commit comments