Skip to content

Commit 8b72f77

Browse files
authored
Merge pull request #2369 from sirosen/pin-github-actions
Hash-pin github actions versions
2 parents 2f9a90c + 87a1a1f commit 8b72f77

4 files changed

Lines changed: 21 additions & 20 deletions

File tree

.github/workflows/ci.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ jobs:
108108
109109
steps:
110110
- name: Switch to using Python 3.14 by default
111-
uses: actions/setup-python@v6
111+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
112112
with:
113113
python-version: 3.14
114114
- name: >-
@@ -144,7 +144,7 @@ jobs:
144144
) as outputs_file:
145145
print('release-requested=true', file=outputs_file)
146146
- name: Check out src from Git
147-
uses: actions/checkout@v4
147+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
148148
with:
149149
fetch-depth: >-
150150
${{
@@ -179,7 +179,7 @@ jobs:
179179
- name: Set up pip cache
180180
if: >-
181181
steps.request-check.outputs.release-requested != 'true'
182-
uses: re-actors/cache-python-deps@release/v1
182+
uses: re-actors/cache-python-deps@810325a232f2a28ea124dfba85c7c72fd1774b38 # v1.0.0
183183
with:
184184
cache-key-for-dependency-files: >-
185185
${{ steps.calc-cache-key-files.outputs.cache-key-for-dep-files }}
@@ -339,16 +339,16 @@ jobs:
339339
|| ''
340340
}}
341341
steps:
342-
- uses: actions/checkout@v5
342+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
343343
- name: Set up Python ${{ matrix.python-version }} from GitHub
344344
id: python-install
345345
if: "!endsWith(matrix.python-version, '-dev')"
346-
uses: actions/setup-python@v6
346+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
347347
with:
348348
python-version: ${{ matrix.python-version }}
349349
- name: Set up Python ${{ matrix.python-version }} from deadsnakes
350350
if: endsWith(matrix.python-version, '-dev')
351-
uses: deadsnakes/action@v2.1.1
351+
uses: deadsnakes/action@e640ac8743173a67cca4d7d77cd837e514bf98e8 # v3.2.0
352352
with:
353353
python-version: ${{ matrix.python-version }}
354354
- name: Log python version info (${{ matrix.python-version }})
@@ -359,7 +359,7 @@ jobs:
359359
run: |
360360
echo "dir=$(pip cache dir)" >> "${GITHUB_OUTPUT}"
361361
- name: Pip cache
362-
uses: actions/cache@v4
362+
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
363363
with:
364364
path: ${{ steps.pip-cache.outputs.dir }}
365365
key: >-
@@ -415,7 +415,7 @@ jobs:
415415
if: >-
416416
!cancelled()
417417
&& !inputs.cpython-pip-version
418-
uses: codecov/codecov-action@v5
418+
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
419419
with:
420420
files: ./coverage.xml
421421
flags: >-
@@ -449,9 +449,9 @@ jobs:
449449
env:
450450
TOXENV: pip${{ matrix.pip-version }}
451451
steps:
452-
- uses: actions/checkout@v5
452+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
453453
- name: Set up Python ${{ matrix.python-version }}
454-
uses: actions/setup-python@v6
454+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
455455
with:
456456
python-version: ${{ matrix.python-version }}
457457
- name: Get pip cache dir
@@ -460,7 +460,7 @@ jobs:
460460
run: |
461461
echo "dir=$(pip cache dir)" >> "${GITHUB_OUTPUT}"
462462
- name: Pip cache
463-
uses: actions/cache@v4
463+
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
464464
with:
465465
path: ${{ steps.pip-cache.outputs.dir }}
466466
key: >-
@@ -524,7 +524,7 @@ jobs:
524524
- name: Notify Codecov that all coverage reports have been uploaded
525525
if: >-
526526
!cancelled()
527-
uses: codecov/codecov-action@v5
527+
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
528528
with:
529529
fail_ci_if_error: true
530530
run_command: send-notifications
@@ -552,6 +552,6 @@ jobs:
552552

553553
steps:
554554
- name: Decide whether the needed jobs succeeded or failed
555-
uses: re-actors/alls-green@afee1c1eac2a506084c274e9c02c8e0687b48d9e
555+
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
556556
with:
557557
jobs: ${{ toJSON(needs) }}

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ jobs:
9494

9595
steps:
9696
- name: Download all the dists
97-
uses: actions/download-artifact@v4
97+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
9898
with:
9999
name: >-
100100
${{ needs.build-and-test.outputs.dists-artifact-name }}
@@ -105,11 +105,11 @@ jobs:
105105
needs.build-and-test.outputs.project-version
106106
}} to PyPI
107107
🔏
108-
uses: pypa/gh-action-pypi-publish@release/v1
108+
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
109109
- name: Clean up the publish attestation leftovers
110110
run: rm -fv dist/*.publish.attestation
111111
- name: Upload packages to Jazzband
112-
uses: pypa/gh-action-pypi-publish@release/v1
112+
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
113113
with:
114114
user: jazzband
115115
password: ${{ secrets.JAZZBAND_RELEASE_KEY }}

.github/workflows/reusable-qa.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,17 @@ jobs:
2323
TOXENV: ${{ matrix.toxenv }}
2424
TOX_PARALLEL_NO_SPINNER: 1
2525
steps:
26-
- uses: actions/checkout@v5
26+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2727
- name: Set up Python ${{ matrix.python-version }}
28-
uses: actions/setup-python@v6
28+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
2929
with:
3030
python-version: ${{ matrix.python-version }}
3131
- name: Get pip cache dir
3232
id: pip-cache
3333
run: |
3434
echo "dir=$(pip cache dir)" >> "${GITHUB_OUTPUT}"
3535
- name: Pip cache
36-
uses: actions/cache@v4
36+
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
3737
with:
3838
path: ${{ steps.pip-cache.outputs.dir }}
3939
key: >-
@@ -46,7 +46,7 @@ jobs:
4646
- name: Prepare cache key
4747
id: cache-key
4848
run: echo "sha-256=$(python -VV | sha256sum | cut -d' ' -f1)" >> "${GITHUB_OUTPUT}"
49-
- uses: actions/cache@v4
49+
- uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
5050
with:
5151
path: ~/.cache/pre-commit
5252
key: pre-commit|${{ steps.cache-key.outputs.sha-256 }}|${{ hashFiles('.pre-commit-config.yaml') }}

changelog.d/+0a4c9a70.contrib.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
`pip-tools` CI now pins GitHub Actions versions to hashes -- by {user}`sirosen`.

0 commit comments

Comments
 (0)