Skip to content

Commit 3769709

Browse files
authored
Pin the versions of CI actions to commit sha's (#865)
1 parent 51e21a8 commit 3769709

File tree

4 files changed

+56
-53
lines changed

4 files changed

+56
-53
lines changed

.github/workflows/ci-build-checks.yaml

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# Bazel artifacts, and can be invoked manually via the "Run workflow" button at
77
# https://github.com/tensorflow/quantum/actions/workflows/ci-build-checks.yaml
88
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9+
# yamllint disable rule:line-length
910

1011
name: CI build checks
1112
run-name: Continuous integration build & test
@@ -178,12 +179,12 @@ jobs:
178179
debug: ${{steps.parameters.outputs.debug}}
179180
steps:
180181
- name: Check out a copy of the TFQ git repository
181-
uses: actions/checkout@v4
182+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
182183

183184
# Note: setup-python has a cache facility, but we don't use it here
184185
# because we want to cache more Python things than setup-python does.
185186
- name: Set up Python ${{inputs.python_ver || env.python_ver}}
186-
uses: actions/setup-python@v5
187+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5
187188
with:
188189
python-version: ${{inputs.python_ver || env.python_ver}}
189190

@@ -218,7 +219,7 @@ jobs:
218219
fi
219220
220221
- name: Test if the cache already exists
221-
uses: actions/cache@v4
222+
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4
222223
id: check_cache
223224
with:
224225
lookup-only: true
@@ -241,7 +242,7 @@ jobs:
241242
steps.check_cache.outputs.cache-hit != 'true' ||
242243
inputs.remake_python_cache == 'true'
243244
name: Set up the Python cache
244-
uses: actions/cache@v4
245+
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4
245246
id: restore_cache
246247
with:
247248
key: ${{steps.parameters.outputs.python_cache_key}}
@@ -269,22 +270,22 @@ jobs:
269270
runs-on: ubuntu-22.04
270271
steps:
271272
- name: Check out a copy of the TFQ git repository
272-
uses: actions/checkout@v4
273+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
273274

274275
- name: Set up Python
275-
uses: actions/setup-python@v5
276+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5
276277
with:
277278
python-version: ${{inputs.python_ver || env.python_ver}}
278279

279280
- name: Restore our Python cache
280-
uses: actions/cache@v4
281+
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4
281282
with:
282283
key: ${{needs.Setup.outputs.python_cache_key}}
283284
path: ${{needs.Setup.outputs.python_cache_paths}}
284285
fail-on-cache-miss: true
285286

286287
- name: Set up Bazel
287-
uses: bazel-contrib/[email protected]
288+
uses: bazel-contrib/setup-bazel@c50333a3696ad2e6df1e7a2f9b417c5336db774f # 0.12.0
288289
# Note that we don't need to set the Bazel version to use, because it
289290
# knows to use what's in the .bazel-version file.
290291
with:
@@ -307,7 +308,7 @@ jobs:
307308
pip install -U ./wheel/*.whl
308309
309310
- name: Save the wheel for the tutorial tests
310-
uses: actions/upload-artifact@v4
311+
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4
311312
with:
312313
name: wheel-${{github.run_id}}
313314
path: ./wheel
@@ -316,7 +317,7 @@ jobs:
316317

317318
- if: failure() || needs.Setup.outputs.debug == 'true'
318319
name: Make Bazel artifacts downloadable for analysis
319-
uses: actions/upload-artifact@v4
320+
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4
320321
with:
321322
name: bazel-build-artifacts-${{github.run_id}}
322323
retention-days: 14
@@ -338,22 +339,22 @@ jobs:
338339
runs-on: ubuntu-22.04
339340
steps:
340341
- name: Check out a copy of the TFQ git repository
341-
uses: actions/checkout@v4
342+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
342343

343344
- name: Set up Python
344-
uses: actions/setup-python@v5
345+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5
345346
with:
346347
python-version: ${{inputs.python_ver || env.python_ver}}
347348

348349
- name: Restore our Python cache
349-
uses: actions/cache@v4
350+
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4
350351
with:
351352
key: ${{needs.Setup.outputs.python_cache_key}}
352353
path: ${{needs.Setup.outputs.python_cache_paths}}
353354
fail-on-cache-miss: true
354355

355356
- name: Get the Python wheel we built
356-
uses: actions/download-artifact@v4
357+
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4
357358
with:
358359
name: wheel-${{github.run_id}}
359360
path: ./wheel
@@ -374,22 +375,22 @@ jobs:
374375
runs-on: ubuntu-22.04
375376
steps:
376377
- name: Check out a copy of the TFQ git repository
377-
uses: actions/checkout@v4
378+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
378379

379380
- name: Set up Python
380-
uses: actions/setup-python@v5
381+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5
381382
with:
382383
python-version: ${{inputs.python_ver || env.python_ver}}
383384

384385
- name: Restore our Python cache
385-
uses: actions/cache@v4
386+
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4
386387
with:
387388
key: ${{needs.Setup.outputs.python_cache_key}}
388389
path: ${{needs.Setup.outputs.python_cache_paths}}
389390
fail-on-cache-miss: true
390391

391392
- name: Set up Bazel
392-
uses: bazel-contrib/[email protected]
393+
uses: bazel-contrib/setup-bazel@c50333a3696ad2e6df1e7a2f9b417c5336db774f # 0.12.0
393394
with:
394395
bazelrc: ${{env.bazelrc_additions}}
395396
bazelisk-cache: true
@@ -407,7 +408,7 @@ jobs:
407408
408409
- if: failure() || needs.Setup.outputs.debug == 'true'
409410
name: Make Bazel artifacts downloadable for analysis
410-
uses: actions/upload-artifact@v4
411+
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4
411412
with:
412413
name: bazel-tests-${{github.run_id}}
413414
retention-days: 7
@@ -428,22 +429,22 @@ jobs:
428429
needs: [Decision, Setup, Build_wheel]
429430
steps:
430431
- name: Check out a copy of the TFQ git repository
431-
uses: actions/checkout@v4
432+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
432433

433434
- name: Set up Python
434-
uses: actions/setup-python@v5
435+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5
435436
with:
436437
python-version: ${{inputs.python_ver || env.python_ver}}
437438

438439
- name: Restore our Python cache
439-
uses: actions/cache@v4
440+
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4
440441
with:
441442
key: ${{needs.Setup.outputs.python_cache_key}}
442443
path: ${{needs.Setup.outputs.python_cache_paths}}
443444
fail-on-cache-miss: true
444445

445446
- name: Get the Python wheel we built
446-
uses: actions/download-artifact@v4
447+
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4
447448
with:
448449
name: wheel-${{github.run_id}}
449450
path: ./wheel
@@ -473,22 +474,22 @@ jobs:
473474
runs-on: ubuntu-22.04
474475
steps:
475476
- name: Check out a copy of the TFQ git repository
476-
uses: actions/checkout@v4
477+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
477478

478479
- name: Set up Python
479-
uses: actions/setup-python@v5
480+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5
480481
with:
481482
python-version: ${{inputs.python_ver || env.python_ver}}
482483

483484
- name: Restore our Python cache
484-
uses: actions/cache@v4
485+
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4
485486
with:
486487
key: ${{needs.Setup.outputs.python_cache_key}}
487488
path: ${{needs.Setup.outputs.python_cache_paths}}
488489
fail-on-cache-miss: true
489490

490491
- name: Set up Bazel
491-
uses: bazel-contrib/[email protected]
492+
uses: bazel-contrib/setup-bazel@c50333a3696ad2e6df1e7a2f9b417c5336db774f # 0.12.0
492493
with:
493494
bazelrc: ${{env.bazelrc_additions}}
494495
bazelisk-cache: true

.github/workflows/ci-file-checks.yaml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,10 @@ jobs:
109109
echo base=${{github.ref_name}} >> "$GITHUB_ENV"
110110
111111
- name: Check out a copy of the TFQ git repository
112-
uses: actions/checkout@v4
112+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
113113

114114
- name: Determine files changed by this ${{github.event_name}} event
115-
uses: dorny/paths-filter@v3
115+
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
116116
id: filter
117117
with:
118118
base: ${{env.base}}
@@ -142,12 +142,12 @@ jobs:
142142
cache_paths: ${{steps.parameters.outputs.cache_paths}}
143143
steps:
144144
- name: Check out a copy of the TFQ git repository
145-
uses: actions/checkout@v4
145+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
146146

147147
# Note: setup-python has a cache facility, but we don't use it here
148148
# because we want to cache more Python things than setup-python does.
149149
- name: Set up Python ${{inputs.python_ver || env.python_ver}}
150-
uses: actions/setup-python@v5
150+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5
151151
with:
152152
python-version: ${{inputs.python_ver || env.python_ver}}
153153

@@ -167,7 +167,7 @@ jobs:
167167
} >> "$GITHUB_OUTPUT"
168168
169169
- name: Test if the cache already exists
170-
uses: actions/cache@v4
170+
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4
171171
id: check_cache
172172
with:
173173
lookup-only: true
@@ -190,7 +190,7 @@ jobs:
190190
steps.check_cache.outputs.cache-hit != 'true' ||
191191
inputs.remake_python_cache == 'true'
192192
name: Set up the Python cache
193-
uses: actions/cache@v4
193+
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4
194194
id: restore_cache
195195
with:
196196
key: ${{steps.parameters.outputs.cache_key}}
@@ -227,7 +227,7 @@ jobs:
227227
changed_files: ${{needs.Changes.outputs.cc_files}}
228228
steps:
229229
- name: Check out a copy of the TFQ git repository
230-
uses: actions/checkout@v4
230+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
231231

232232
- name: Set up clang-format output problem matcher
233233
run: echo '::add-matcher::.github/problem-matchers/clang-format.json'
@@ -264,15 +264,15 @@ jobs:
264264
runs-on: ubuntu-22.04
265265
steps:
266266
- name: Check out a copy of the TFQ git repository
267-
uses: actions/checkout@v4
267+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
268268

269269
- name: Set up Python
270-
uses: actions/setup-python@v5
270+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5
271271
with:
272272
python-version: ${{inputs.python_ver || env.python_ver}}
273273

274274
- name: Restore the Python cache
275-
uses: actions/cache@v4
275+
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4
276276
with:
277277
key: ${{needs.Setup.outputs.cache_key}}
278278
path: ${{needs.Setup.outputs.cache_paths}}
@@ -304,15 +304,15 @@ jobs:
304304
runs-on: ubuntu-22.04
305305
steps:
306306
- name: Check out a copy of the TFQ git repository
307-
uses: actions/checkout@v4
307+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
308308

309309
- name: Set up Python
310-
uses: actions/setup-python@v5
310+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5
311311
with:
312312
python-version: ${{inputs.python_ver || env.python_ver}}
313313

314314
- name: Restore the Python cache
315-
uses: actions/cache@v4
315+
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4
316316
with:
317317
key: ${{needs.Setup.outputs.cache_key}}
318318
path: ${{needs.Setup.outputs.cache_paths}}
@@ -350,7 +350,7 @@ jobs:
350350
runs-on: ubuntu-24.04
351351
steps:
352352
- name: Check out a copy of the TFQ git repository
353-
uses: actions/checkout@v4
353+
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
354354

355355
- name: Set up yamllint output problem matcher
356356
run: echo '::add-matcher::.github/problem-matchers/yamllint.json'

.github/workflows/ci-nightly-build-test.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# This workflow also can be invoked manually via the "Run workflow" button at
1414
# https://github.com/tensorflow/quantum/actions/workflows/ci-build-checks.yaml
1515
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16+
# yamllint disable rule:line-length
1617

1718
name: CI nightly full test
1819
run-name: Continuous integration nightly build & test
@@ -61,7 +62,7 @@ jobs:
6162
run: ${{steps.commits.outputs.count > 0}}
6263
steps:
6364
- name: Check out a sparse copy of the git repo for TFQ
64-
uses: actions/checkout@v4
65+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
6566
with:
6667
sparse-checkout: .
6768

@@ -79,15 +80,15 @@ jobs:
7980
runs-on: ubuntu-22.04
8081
steps:
8182
- name: Check out a copy of the TFQ git repository
82-
uses: actions/checkout@v4
83+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
8384

8485
- name: Set up Python ${{inputs.py_version || env.py_version}}
85-
uses: actions/setup-python@v5
86+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5
8687
with:
8788
python-version: ${{inputs.py_version || env.py_version}}
8889

8990
- name: Set up Bazel
90-
uses: bazel-contrib/[email protected]
91+
uses: bazel-contrib/setup-bazel@f3f50ea6791b9b0f4c4eeabba4507422426462f5 # 0.9.1
9192
with:
9293
bazelrc: ${{env.bazelrc_additions}}
9394

@@ -123,7 +124,7 @@ jobs:
123124
124125
- if: failure() || inputs.save_artifacts == 'true'
125126
name: Make artifacts downloadable
126-
uses: actions/upload-artifact@v4
127+
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4
127128
with:
128129
name: test-artifacts
129130
retention-days: 7

0 commit comments

Comments
 (0)