Skip to content

Commit 042b556

Browse files
committed
ci: pin actions to full commit IDs
The repository requires actions to be pinned to full commit IDs. References to version tags or branches fail during job setup, before the build, tests, or style checks can run. Resolve the action versions used by the CI, style, and whitespace workflows to their current commits. Keep the version names in comments so that the pins remain easy to identify and update. Signed-off-by: Taylor Blau <ttaylorr@openai.com>
1 parent 67e9d47 commit 042b556

3 files changed

Lines changed: 34 additions & 34 deletions

File tree

.github/workflows/check-style.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
jobname: ClangFormat
2121
runs-on: ubuntu-latest
2222
steps:
23-
- uses: actions/checkout@v6
23+
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
2424
with:
2525
fetch-depth: 0
2626

.github/workflows/check-whitespace.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
check-whitespace:
2020
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/checkout@v6
22+
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
2323
with:
2424
fetch-depth: 0
2525

.github/workflows/main.yml

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
echo "skip_concurrent=$skip_concurrent" >>$GITHUB_OUTPUT
6464
- name: skip if the commit or tree was already tested
6565
id: skip-if-redundant
66-
uses: actions/github-script@v9
66+
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
6767
if: steps.check-ref.outputs.enabled == 'yes'
6868
with:
6969
github-token: ${{secrets.GITHUB_TOKEN}}
@@ -112,8 +112,8 @@ jobs:
112112
group: windows-build-${{ github.ref }}
113113
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
114114
steps:
115-
- uses: actions/checkout@v6
116-
- uses: git-for-windows/setup-git-for-windows-sdk@v2
115+
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
116+
- uses: git-for-windows/setup-git-for-windows-sdk@335917db02da4280d3d5e87915d7b86196677f9f # v2
117117
- name: build
118118
shell: bash
119119
env:
@@ -123,7 +123,7 @@ jobs:
123123
- name: zip up tracked files
124124
run: git archive -o artifacts/tracked.tar.gz HEAD
125125
- name: upload tracked files and build artifacts
126-
uses: actions/upload-artifact@v7
126+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
127127
with:
128128
name: windows-artifacts
129129
path: artifacts
@@ -140,14 +140,14 @@ jobs:
140140
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
141141
steps:
142142
- name: download tracked files and build artifacts
143-
uses: actions/download-artifact@v8
143+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
144144
with:
145145
name: windows-artifacts
146146
path: ${{github.workspace}}
147147
- name: extract tracked files and build artifacts
148148
shell: bash
149149
run: tar xf artifacts.tar.gz && tar xf tracked.tar.gz
150-
- uses: git-for-windows/setup-git-for-windows-sdk@v2
150+
- uses: git-for-windows/setup-git-for-windows-sdk@335917db02da4280d3d5e87915d7b86196677f9f # v2
151151
- name: test
152152
shell: bash
153153
run: . /etc/profile && ci/run-test-slice.sh $((${{matrix.nr}} + 1)) 10
@@ -157,7 +157,7 @@ jobs:
157157
run: ci/print-test-failures.sh
158158
- name: Upload failed tests' directories
159159
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
160-
uses: actions/upload-artifact@v7
160+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
161161
with:
162162
name: failed-tests-windows-${{ matrix.nr }}
163163
path: ${{env.FAILED_TEST_ARTIFACTS}}
@@ -173,20 +173,20 @@ jobs:
173173
group: vs-build-${{ github.ref }}
174174
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
175175
steps:
176-
- uses: actions/checkout@v6
177-
- uses: git-for-windows/setup-git-for-windows-sdk@v2
176+
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
177+
- uses: git-for-windows/setup-git-for-windows-sdk@335917db02da4280d3d5e87915d7b86196677f9f # v2
178178
- name: initialize vcpkg
179-
uses: actions/checkout@v6
179+
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
180180
with:
181181
repository: 'microsoft/vcpkg'
182182
path: 'compat/vcbuild/vcpkg'
183183
- name: download vcpkg artifacts
184-
uses: git-for-windows/get-azure-pipelines-artifact@v0
184+
uses: git-for-windows/get-azure-pipelines-artifact@2e424b98e1251b725d6064c5f1a9f854a33e5b88 # v0
185185
with:
186186
repository: git/git
187187
definitionId: 9
188188
- name: add msbuild to PATH
189-
uses: microsoft/setup-msbuild@v3
189+
uses: microsoft/setup-msbuild@30375c66a4eea26614e0d39710365f22f8b0af57 # v3
190190
- name: copy dlls to root
191191
shell: cmd
192192
run: compat\vcbuild\vcpkg_copy_dlls.bat release
@@ -208,7 +208,7 @@ jobs:
208208
- name: zip up tracked files
209209
run: git archive -o artifacts/tracked.tar.gz HEAD
210210
- name: upload tracked files and build artifacts
211-
uses: actions/upload-artifact@v7
211+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
212212
with:
213213
name: vs-artifacts
214214
path: artifacts
@@ -224,9 +224,9 @@ jobs:
224224
group: vs-test-${{ matrix.nr }}-${{ github.ref }}
225225
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
226226
steps:
227-
- uses: git-for-windows/setup-git-for-windows-sdk@v2
227+
- uses: git-for-windows/setup-git-for-windows-sdk@335917db02da4280d3d5e87915d7b86196677f9f # v2
228228
- name: download tracked files and build artifacts
229-
uses: actions/download-artifact@v8
229+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
230230
with:
231231
name: vs-artifacts
232232
path: ${{github.workspace}}
@@ -244,7 +244,7 @@ jobs:
244244
run: ci/print-test-failures.sh
245245
- name: Upload failed tests' directories
246246
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
247-
uses: actions/upload-artifact@v7
247+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
248248
with:
249249
name: failed-tests-windows-vs-${{ matrix.nr }}
250250
path: ${{env.FAILED_TEST_ARTIFACTS}}
@@ -258,8 +258,8 @@ jobs:
258258
group: windows-meson-build-${{ github.ref }}
259259
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
260260
steps:
261-
- uses: actions/checkout@v6
262-
- uses: actions/setup-python@v6
261+
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
262+
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
263263
- name: Set up dependencies
264264
shell: pwsh
265265
run: pip install meson ninja
@@ -270,7 +270,7 @@ jobs:
270270
shell: pwsh
271271
run: meson compile -C build
272272
- name: Upload build artifacts
273-
uses: actions/upload-artifact@v7
273+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
274274
with:
275275
name: windows-meson-artifacts
276276
path: build
@@ -286,13 +286,13 @@ jobs:
286286
group: windows-meson-test-${{ matrix.nr }}-${{ github.ref }}
287287
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
288288
steps:
289-
- uses: actions/checkout@v6
290-
- uses: actions/setup-python@v6
289+
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
290+
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
291291
- name: Set up dependencies
292292
shell: pwsh
293293
run: pip install meson ninja
294294
- name: Download build artifacts
295-
uses: actions/download-artifact@v8
295+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
296296
with:
297297
name: windows-meson-artifacts
298298
path: build
@@ -305,7 +305,7 @@ jobs:
305305
run: ci/print-test-failures.sh
306306
- name: Upload failed tests' directories
307307
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
308-
uses: actions/upload-artifact@v7
308+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
309309
with:
310310
name: failed-tests-windows-meson-${{ matrix.nr }}
311311
path: ${{env.FAILED_TEST_ARTIFACTS}}
@@ -341,15 +341,15 @@ jobs:
341341
TEST_OUTPUT_DIRECTORY: ${{github.workspace}}/t
342342
runs-on: ${{matrix.vector.pool}}
343343
steps:
344-
- uses: actions/checkout@v6
344+
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
345345
- run: ci/install-dependencies.sh
346346
- run: ci/run-build-and-tests.sh
347347
- name: print test failures
348348
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
349349
run: ci/print-test-failures.sh
350350
- name: Upload failed tests' directories
351351
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
352-
uses: actions/upload-artifact@v7
352+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
353353
with:
354354
name: failed-tests-${{matrix.vector.jobname}}
355355
path: ${{env.FAILED_TEST_ARTIFACTS}}
@@ -362,7 +362,7 @@ jobs:
362362
CI_JOB_IMAGE: ubuntu-latest
363363
runs-on: ubuntu-latest
364364
steps:
365-
- uses: actions/checkout@v6
365+
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
366366
- run: ci/install-dependencies.sh
367367
- run: ci/run-build-and-minimal-fuzzers.sh
368368
dockerized:
@@ -441,7 +441,7 @@ jobs:
441441
else
442442
apt-get -q update && apt-get -q -y install git
443443
fi
444-
- uses: actions/checkout@v6
444+
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
445445
- run: ci/install-dependencies.sh
446446
- run: useradd builder --create-home
447447
- run: chown -R builder .
@@ -451,7 +451,7 @@ jobs:
451451
run: sudo --preserve-env --set-home --user=builder ci/print-test-failures.sh
452452
- name: Upload failed tests' directories
453453
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
454-
uses: actions/upload-artifact@v7
454+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
455455
with:
456456
name: failed-tests-${{matrix.vector.jobname}}
457457
path: ${{env.FAILED_TEST_ARTIFACTS}}
@@ -466,7 +466,7 @@ jobs:
466466
group: static-analysis-${{ github.ref }}
467467
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
468468
steps:
469-
- uses: actions/checkout@v6
469+
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
470470
- run: ci/install-dependencies.sh
471471
- run: ci/run-static-analysis.sh
472472
- run: ci/check-directional-formatting.bash
@@ -482,7 +482,7 @@ jobs:
482482
group: rust-analysis-${{ github.ref }}
483483
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
484484
steps:
485-
- uses: actions/checkout@v6
485+
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
486486
- run: ci/install-dependencies.sh
487487
- run: ci/run-rust-checks.sh
488488
sparse:
@@ -496,7 +496,7 @@ jobs:
496496
group: sparse-${{ github.ref }}
497497
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
498498
steps:
499-
- uses: actions/checkout@v6
499+
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
500500
- name: Install other dependencies
501501
run: ci/install-dependencies.sh
502502
- run: make sparse
@@ -512,6 +512,6 @@ jobs:
512512
CI_JOB_IMAGE: ubuntu-latest
513513
runs-on: ubuntu-latest
514514
steps:
515-
- uses: actions/checkout@v6
515+
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
516516
- run: ci/install-dependencies.sh
517517
- run: ci/test-documentation.sh

0 commit comments

Comments
 (0)