Skip to content

Commit b2063da

Browse files
committed
ci: pin third-party actions to commit SHAs
Replace tag references (@v4, @v5, @release/v1, ...) with the corresponding commit SHA, keeping the tag in a trailing comment so the human-readable version is still visible. This protects CI from an upstream tag being moved to point at different code than what we last reviewed. The ably/features reusable workflow reference is left on @main on purpose, since that's an internal Ably workflow.
1 parent 391460b commit b2063da

3 files changed

Lines changed: 16 additions & 16 deletions

File tree

.github/workflows/check.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,22 @@ jobs:
2323
matrix:
2424
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
2525
steps:
26-
- uses: actions/checkout@v4
26+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
2727
with:
2828
submodules: 'recursive'
2929
persist-credentials: false
3030
- name: Set up Python ${{ matrix.python-version }}
31-
uses: actions/setup-python@v5
31+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
3232
id: setup-python
3333
with:
3434
python-version: ${{ matrix.python-version }}
3535

3636
- name: Install uv
37-
uses: astral-sh/setup-uv@v7
37+
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
3838
with:
3939
enable-cache: true
4040

41-
- uses: actions/cache@v4
41+
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
4242
name: Define a cache for the virtual environment based on the dependencies lock file
4343
id: cache
4444
with:

.github/workflows/lint.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,22 @@ jobs:
1414
contents: read
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v4
17+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
1818
with:
1919
submodules: 'recursive'
2020
persist-credentials: false
2121
- name: Set up Python 3.9
22-
uses: actions/setup-python@v5
22+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
2323
id: setup-python
2424
with:
2525
python-version: '3.9'
2626

2727
- name: Install uv
28-
uses: astral-sh/setup-uv@v7
28+
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
2929
with:
3030
enable-cache: true
3131

32-
- uses: actions/cache@v4
32+
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
3333
name: Define a cache for the virtual environment based on the dependencies lock file
3434
id: cache
3535
with:

.github/workflows/release.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@ jobs:
1616
contents: read
1717

1818
steps:
19-
- uses: actions/checkout@v4
19+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
2020
with:
2121
submodules: 'recursive'
2222
persist-credentials: false
2323
- name: Set up Python 3.12
24-
uses: actions/setup-python@v5
24+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
2525
id: setup-python
2626
with:
2727
python-version: 3.12
2828

2929
- name: Install uv
30-
uses: astral-sh/setup-uv@v7
30+
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
3131
with:
3232
enable-cache: false
3333

@@ -38,7 +38,7 @@ jobs:
3838
- name: Build a binary wheel and a source tarball
3939
run: uv build
4040
- name: Store the distribution packages
41-
uses: actions/upload-artifact@v4
41+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
4242
with:
4343
name: python-package-distributions
4444
path: dist/
@@ -80,7 +80,7 @@ jobs:
8080

8181
steps:
8282
- name: Download all the dists
83-
uses: actions/download-artifact@v4
83+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
8484
with:
8585
name: python-package-distributions
8686
path: dist/
@@ -108,7 +108,7 @@ jobs:
108108
TAG: ${{ steps.tag.outputs.tag }}
109109

110110
- name: Publish distribution 📦 to PyPI
111-
uses: pypa/gh-action-pypi-publish@release/v1
111+
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # release/v1
112112

113113
publish-to-testpypi:
114114
name: Publish Python distribution to TestPyPI
@@ -125,11 +125,11 @@ jobs:
125125

126126
steps:
127127
- name: Download all the dists
128-
uses: actions/download-artifact@v4
128+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
129129
with:
130130
name: python-package-distributions
131131
path: dist/
132132
- name: Publish distribution 📦 to TestPyPI
133-
uses: pypa/gh-action-pypi-publish@release/v1
133+
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # release/v1
134134
with:
135135
repository-url: https://test.pypi.org/legacy/

0 commit comments

Comments
 (0)