@@ -7,6 +7,9 @@ name: Check, Build and Deploy
77 branches : [main]
88 tags : [v*]
99
10+ permissions :
11+ contents : read
12+
1013jobs :
1114 uv-check :
1215 runs-on : ubuntu-latest
@@ -110,62 +113,9 @@ jobs:
110113 uv run -- mypy "${ARGS[@]}"
111114
112115 pre-commit : # yamllint disable-line rule:key-ordering
113- env :
114- UV_FROZEN : true
115- UV_NO_SYNC : true
116- UV_PYTHON_DOWNLOADS : never
117- runs-on : ubuntu-latest
118-
119- steps :
120- - uses : actions/checkout@v6
121-
122- - name : Add GB Locale
123- run : |
124- sudo apt-get update
125- sudo apt-get install -y locales
126- sudo locale-gen en_GB.UTF-8
127- shell : bash
128-
129- - name : Set Up Python
130- uses : actions/setup-python@v6
131- with :
132- python-version-file : .python-version
133-
134- - name : Install uv
135- uses : astral-sh/setup-uv@v7
136- with :
137- enable-cache : true
138-
139- - name : Install prek From Locked Dependencies
140- run : uv sync --only-group pre-commit
141-
142- - id : store-hashed-python-version
143- name : Store Hashed Python Version
144- run : echo "hashed_python_version=$(uv run -- python -VV | sha256sum | cut -d' ' -f1)"
145- >> "$GITHUB_OUTPUT"
146-
147- - uses : actions/cache@v5
148- with :
149- key : prek|${{steps.store-hashed-python-version.outputs.hashed_python_version}}|${{hashFiles('.pre-commit-config.yaml')}}
150- path : ~/.cache/prek
151-
152- - name : Setup pre-commit Environments
153- run : uv run -- prek install-hooks
154-
155- - name : Run prek
156- run : |
157- set -o pipefail
158- if [[ "${{github.event_name}}" == "push" && "${{github.ref_name}}" == "${{github.event.repository.default_branch}}" ]]; then
159- uv run -- prek run --all-files --hook-stage manual --color never --skip ruff-check --skip uv-lock --skip gitlint-ci | tee /tmp/prek.log
160- else
161- uv run -- prek run --all-files --hook-stage manual --color never --skip ruff-check --skip uv-lock | tee /tmp/prek.log
162- fi
163-
164- - name : Ensure No Warnings
165- run : " if grep -q '^warning: ' /tmp/prek.log; then exit 1; fi"
166-
167- - if : ${{!cancelled()}}
168- uses : pre-commit-ci/lite-action@v1.1.0
116+ uses : ./.github/workflows/autofix-pre-commit.yaml
117+ with :
118+ skip-autofix : true
169119
170120 pymarkdown : # yamllint disable-line rule:key-ordering
171121 env :
@@ -290,7 +240,6 @@ jobs:
290240 needs : [mypy, pre-commit, pymarkdown, pytest, ruff-lint, uv-check]
291241 permissions :
292242 attestations : write
293- contents : read
294243 id-token : write
295244 packages : write
296245 runs-on : ubuntu-latest
0 commit comments