Skip to content

Commit 4f082d0

Browse files
authored
Upgrade GitHub actions (#720)
Upgrades all Github actions used in CI to latest release and moves them to commit SHA rather than tags. Follow-up on #719.
1 parent 8608181 commit 4f082d0

14 files changed

Lines changed: 83 additions & 83 deletions

File tree

.github/actions/test/action.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ runs:
2222

2323
- name: Setup Python
2424
if: inputs.python-version != 'installed'
25-
uses: actions/setup-python@v5
25+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
2626
with:
2727
python-version: ${{ inputs.python-version }}
2828

2929
- name: Checkout
30-
uses: actions/checkout@v4
30+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3131

3232
- name: Detect OS
3333
id: os
@@ -49,7 +49,7 @@ runs:
4949
shell: bash
5050

5151
- name: Cache PIP Packages
52-
uses: actions/cache@v4
52+
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
5353
id: cache
5454
if: github.event_name != 'schedule'
5555
with:
@@ -121,7 +121,7 @@ runs:
121121
shell: bash
122122
- name: Upload changed expectation files
123123
if: steps.changes.outcome == 'failure'
124-
uses: actions/upload-artifact@v4
124+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
125125
with:
126126
name: Changed expectations (python-${{ inputs.python-version }}, ${{ inputs.os }})
127127
path: changed-expectations.zip
@@ -157,7 +157,7 @@ runs:
157157

158158
- name: Upload Test Results
159159
if: (!cancelled())
160-
uses: actions/upload-artifact@v4
160+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
161161
with:
162162
name: Test Results (python-${{ inputs.python-version }}, ${{ inputs.os }})
163163
path: |

.github/workflows/badges.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414

1515
steps:
1616
- name: Checkout
17-
uses: actions/checkout@v5
17+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1818

1919
- name: Get package downloads
2020
id: downloads
@@ -25,7 +25,7 @@ jobs:
2525
package: publish-unit-test-result-action
2626

2727
- name: Create badge
28-
uses: emibcn/badge-action@4209421db54c8764d8932070ffd0f81715a629bf
28+
uses: emibcn/badge-action@808173dd03e2f30c980d03ee49e181626088eee8 # v2.0.3
2929
with:
3030
label: Docker pulls
3131
status: ${{ steps.downloads.outputs.total_downloads }} (${{ steps.downloads.outputs.recent_downloads_per_day }}/d)
@@ -37,14 +37,14 @@ jobs:
3737
echo '{"subject": "Docker pulls", "status": "${{ steps.downloads.outputs.total_downloads }} (${{ steps.downloads.outputs.recent_downloads_per_day }}/d)", "color": "blue"}' > downloads.json
3838
3939
- name: Upload badge to Gist
40-
uses: andymckay/append-gist-action@1fbfbbce708a39bd45846f0955ed5521f2099c6d
40+
uses: andymckay/append-gist-action@ab30bf28df67017c7ad696500b218558c7c04db3 # v0.3
4141
with:
4242
token: ${{ secrets.GIST_TOKEN }}
4343
gistURL: https://gist.githubusercontent.com/EnricoMi/612cb538c14731f1a8fefe504f519395
4444
file: downloads.svg
4545

4646
- name: Upload JSON to Gist
47-
uses: andymckay/append-gist-action@1fbfbbce708a39bd45846f0955ed5521f2099c6d
47+
uses: andymckay/append-gist-action@ab30bf28df67017c7ad696500b218558c7c04db3 # v0.3
4848
with:
4949
token: ${{ secrets.GIST_TOKEN }}
5050
gistURL: https://gist.githubusercontent.com/EnricoMi/612cb538c14731f1a8fefe504f519395
@@ -58,14 +58,14 @@ jobs:
5858

5959
steps:
6060
- name: Checkout
61-
uses: actions/checkout@v5
61+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
6262

6363
- name: Fetch workflows
6464
id: workflows
6565
uses: ./misc/action/fetch-workflows
6666

6767
- name: Create badge
68-
uses: emibcn/badge-action@808173dd03e2f30c980d03ee49e181626088eee8
68+
uses: emibcn/badge-action@808173dd03e2f30c980d03ee49e181626088eee8 # v2.0.3
6969
with:
7070
label: GitHub Workflows
7171
status: ${{ steps.workflows.outputs.total_workflows }}
@@ -77,14 +77,14 @@ jobs:
7777
echo '{"subject": "GitHub Workflows", "status": "${{ steps.workflows.outputs.total_workflows }}", "color": "blue"}' > workflows.json
7878
7979
- name: Upload badge to Gist
80-
uses: andymckay/append-gist-action@6e8d64427fe47cbacf4ab6b890411f1d67c07f3e
80+
uses: andymckay/append-gist-action@ab30bf28df67017c7ad696500b218558c7c04db3 # v0.3
8181
with:
8282
token: ${{ secrets.GIST_TOKEN }}
8383
gistURL: https://gist.githubusercontent.com/EnricoMi/612cb538c14731f1a8fefe504f519395
8484
file: workflows.svg
8585

8686
- name: Upload JSON to Gist
87-
uses: andymckay/append-gist-action@6e8d64427fe47cbacf4ab6b890411f1d67c07f3e
87+
uses: andymckay/append-gist-action@ab30bf28df67017c7ad696500b218558c7c04db3 # v0.3
8888
with:
8989
token: ${{ secrets.GIST_TOKEN }}
9090
gistURL: https://gist.githubusercontent.com/EnricoMi/612cb538c14731f1a8fefe504f519395

.github/workflows/check-action-typing.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ jobs:
1818
runs-on: ubuntu-latest
1919
steps:
2020
- name: Checkout
21-
uses: actions/checkout@v5
21+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2222

2323
- name: Check Action Typing
24-
uses: typesafegithub/github-actions-typing@0dc5690c35c564d354dc0c23c56559f0813ed3ac # v2.2.0
24+
uses: typesafegithub/github-actions-typing@9ddf35b71a482be7d8922b28e8d00df16b77e315 # v2.2.2
2525
with:
2626
ignored-action-files: |-
2727
.github/actions/test/action.yml

.github/workflows/ci-cd.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- name: Checkout
22-
uses: actions/checkout@v5
22+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2323
- name: Check requirements.txt
2424
run: |
2525
(diff -w <(grep -v -e "python_version > '3.7'" -e "python_version == '3.8'" -e "python_version > '3.8'" python/requirements.txt | sed -e "s/;.*//") python/requirements-3.7.txt || true) | (! grep -e "^<")
@@ -33,33 +33,33 @@ jobs:
3333

3434
steps:
3535
- name: Checkout
36-
uses: actions/checkout@v4
36+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3737
- name: Setup Python
38-
uses: actions/setup-python@v6
38+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
3939
with:
4040
python-version: '3.8'
4141
- name: Setup Python
42-
uses: actions/setup-python@v6
42+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
4343
with:
4444
python-version: '3.9'
4545
- name: Setup Python
46-
uses: actions/setup-python@v6
46+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
4747
with:
4848
python-version: '3.10'
4949
- name: Setup Python
50-
uses: actions/setup-python@v6
50+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
5151
with:
5252
python-version: '3.11'
5353
- name: Setup Python
54-
uses: actions/setup-python@v6
54+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
5555
with:
5656
python-version: '3.12'
5757
- name: Setup Python
58-
uses: actions/setup-python@v6
58+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
5959
with:
6060
python-version: '3.13'
6161
- name: Setup Python
62-
uses: actions/setup-python@v6
62+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
6363
with:
6464
python-version: '3.14'
6565
- name: Check for dependency updates
@@ -131,7 +131,7 @@ jobs:
131131

132132
steps:
133133
- name: Checkout
134-
uses: actions/checkout@v5
134+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
135135

136136
- name: Extract action image and version
137137
# we deploy from a specific commit on master (the one that mentions a new version the first time)
@@ -165,7 +165,7 @@ jobs:
165165
steps:
166166
- name: Docker meta
167167
id: docker-meta
168-
uses: docker/metadata-action@v5
168+
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
169169
with:
170170
images: ghcr.io/EnricoMi/publish-unit-test-result-action
171171
flavor: |
@@ -179,20 +179,20 @@ jobs:
179179
type=semver,pattern={{version}},value=${{ needs.config-deploy.outputs.image-version }}
180180
181181
- name: Set up QEMU
182-
uses: docker/setup-qemu-action@v3
182+
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
183183

184184
- name: Set up Docker Buildx
185-
uses: docker/setup-buildx-action@v3
185+
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
186186

187187
- name: Login to GitHub Container Registry
188-
uses: docker/login-action@v3
188+
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
189189
with:
190190
registry: ghcr.io
191191
username: ${{ github.repository_owner }}
192192
password: ${{ secrets.CR_PAT }}
193193

194194
- name: Build and push Docker image
195-
uses: docker/build-push-action@v6
195+
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
196196
with:
197197
tags: ${{ steps.docker-meta.outputs.tags }}
198198
labels: ${{ steps.docker-meta.outputs.labels }}
@@ -215,7 +215,7 @@ jobs:
215215
runs-on: ubuntu-latest
216216
steps:
217217
- name: Upload
218-
uses: actions/upload-artifact@v4
218+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
219219
with:
220220
name: Event File
221221
path: ${{ github.event_path }}

.github/workflows/codeql.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ jobs:
3131

3232
steps:
3333
- name: Checkout repository
34-
uses: actions/checkout@v5
34+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3535

3636
# Initializes the CodeQL tools for scanning.
3737
- name: Initialize CodeQL
38-
uses: github/codeql-action/init@v3
38+
uses: github/codeql-action/init@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4
3939
with:
4040
languages: ${{ matrix.language }}
4141
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -46,7 +46,7 @@ jobs:
4646
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
4747
# If this step fails, then you should remove it and run the build manually (see below)
4848
- name: Autobuild
49-
uses: github/codeql-action/autobuild@v3
49+
uses: github/codeql-action/autobuild@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4
5050

5151
# ℹ️ Command-line programs to run using the OS shell.
5252
# 📚 https://git.io/JvXDl
@@ -60,4 +60,4 @@ jobs:
6060
# make release
6161

6262
- name: Perform CodeQL Analysis
63-
uses: github/codeql-action/analyze@v3
63+
uses: github/codeql-action/analyze@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4

0 commit comments

Comments
 (0)