@@ -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
1518 - uses : actions/checkout@v6
1619
1720 - name : Install uv
18- uses : astral-sh/setup-uv@v7
21+ uses : astral-sh/setup-uv@v8.1.0
1922 with :
2023 enable-cache : true
2124
3841 python-version : 3.14
3942
4043 - name : Install uv
41- uses : astral-sh/setup-uv@v7
44+ uses : astral-sh/setup-uv@v8.1.0
4245 with :
4346 enable-cache : true
4447
6972 python-version-file : .python-version
7073
7174 - name : Install uv
72- uses : astral-sh/setup-uv@v7
75+ uses : astral-sh/setup-uv@v8.1.0
7376 with :
7477 enable-cache : true
7578
@@ -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 :
@@ -183,7 +133,7 @@ jobs:
183133 python-version-file : .python-version
184134
185135 - name : Install uv
186- uses : astral-sh/setup-uv@v7
136+ uses : astral-sh/setup-uv@v8.1.0
187137 with :
188138 enable-cache : true
189139
@@ -212,7 +162,7 @@ jobs:
212162 python-version-file : .python-version
213163
214164 - name : Install uv
215- uses : astral-sh/setup-uv@v7
165+ uses : astral-sh/setup-uv@v8.1.0
216166 with :
217167 enable-cache : true
218168
@@ -240,7 +190,7 @@ jobs:
240190
241191 - if : ${{!cancelled()}}
242192 name : Upload coverage report to Codecov
243- uses : codecov/codecov-action@v5
193+ uses : codecov/codecov-action@v6
244194 with :
245195 use_oidc : true
246196
@@ -260,7 +210,7 @@ jobs:
260210 python-version-file : .python-version
261211
262212 - name : Install uv
263- uses : astral-sh/setup-uv@v7
213+ uses : astral-sh/setup-uv@v8.1.0
264214 with :
265215 enable-cache : true
266216
@@ -289,26 +239,26 @@ jobs:
289239 == 'CSSUoB/TeX-Bot-Py-V2'
290240 needs : [mypy, pre-commit, pymarkdown, pytest, ruff-lint, uv-check]
291241 permissions :
242+ artifact-metadata : write
292243 attestations : write
293- contents : read
294244 id-token : write
295245 packages : write
296246 runs-on : ubuntu-latest
297247
298248 steps :
299249 - name : Log in to the Container registry
300- uses : docker/login-action@v3.7 .0
250+ uses : docker/login-action@v4.1 .0
301251 with :
302252 password : ${{secrets.GITHUB_TOKEN}}
303253 registry : ${{env.REGISTRY}}
304254 username : ${{github.actor}}
305255
306256 - name : Set up Docker Buildx
307- uses : docker/setup-buildx-action@v3
257+ uses : docker/setup-buildx-action@v4
308258
309259 - id : docker-extract-metadata
310260 name : Extract metadata (tags, labels) for Docker
311- uses : docker/metadata-action@v5.10 .0
261+ uses : docker/metadata-action@v6.0 .0
312262 with :
313263 images : ${{env.REGISTRY}}/${{env.IMAGE_NAME}}
314264 tags : |-
@@ -320,14 +270,14 @@ jobs:
320270
321271 - id : build-and-publish
322272 name : Build and Publish
323- uses : docker/build-push-action@v6
273+ uses : docker/build-push-action@v7
324274 with :
325275 labels : ${{steps.docker-extract-metadata.outputs.labels}}
326276 push : true
327277 tags : ${{steps.docker-extract-metadata.outputs.tags}}
328278
329279 - name : Generate Artifact Attestation
330- uses : actions/attest-build-provenance@v3
280+ uses : actions/attest-build-provenance@v4
331281 with :
332282 push-to-registry : true
333283 subject-digest : ${{steps.build-and-publish.outputs.digest}}
0 commit comments