1313# limitations under the License.
1414# Github action job to test core java library features on
1515# downstream client libraries before they are released.
16+ permissions :
17+ contents : read
18+
1619on :
1720 push :
1821 branches :
3235 # runnable is true if there are changes outside the .github/workflows directory OR if ci.yaml itself (or kokoro scripts) is modified.
3336 runnable : ${{ fromJSON(steps.filter.outputs.all_count) > fromJSON(steps.filter.outputs.workflows_count) || fromJSON(steps.filter.outputs.ci_count) > 0 }}
3437 steps :
35- - uses : actions/checkout@v6
38+ - uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
39+ with :
40+ persist-credentials : false
3641 # Use this action, rather than a file filter so that we can make this
3742 # mandatory.
3843 # See https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#example-including-branches
@@ -65,16 +70,18 @@ jobs:
6570 id : date
6671 if : ${{ needs.bulk-filter.outputs.runnable == 'true' }}
6772 run : echo "::set-output name=week_of_year::$(date +'%W' --utc)"
68- - uses : actions/checkout@v4
73+ - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
6974 if : ${{ needs.bulk-filter.outputs.runnable == 'true' }}
70- - uses : actions/setup-java@v4
75+ with :
76+ persist-credentials : false
77+ - uses : actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
7178 if : ${{ needs.bulk-filter.outputs.runnable == 'true' }}
7279 with :
7380 distribution : temurin
7481 java-version : ${{matrix.java}}
7582 - run : java -version
7683 if : ${{ needs.bulk-filter.outputs.runnable == 'true' }}
77- - uses : actions/cache@v4
84+ - uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
7885 id : mvn-cache
7986 if : ${{ needs.bulk-filter.outputs.runnable == 'true' }}
8087 with :
@@ -94,9 +101,11 @@ jobs:
94101 id : date
95102 if : ${{ needs.bulk-filter.outputs.runnable == 'true' }}
96103 run : echo "::set-output name=week_of_year::$(date +'%W' --utc)"
97- - uses : actions/checkout@v4
104+ - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
98105 if : ${{ needs.bulk-filter.outputs.runnable == 'true' }}
99- - uses : actions/setup-java@v4
106+ with :
107+ persist-credentials : false
108+ - uses : actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
100109 if : ${{ needs.bulk-filter.outputs.runnable == 'true' }}
101110 with :
102111 java-version : 8
@@ -107,13 +116,13 @@ jobs:
107116 if : ${{ needs.bulk-filter.outputs.runnable == 'true' }}
108117 run : echo "SUREFIRE_JVM_OPT=-Djvm=${JAVA_HOME}/bin/java" >> $GITHUB_ENV
109118 shell : bash
110- - uses : actions/setup-java@v4
119+ - uses : actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
111120 if : ${{ needs.bulk-filter.outputs.runnable == 'true' }}
112121 with :
113122 java-version : 11
114123 distribution : temurin
115124 cache : maven
116- - uses : actions/cache@v4
125+ - uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
117126 id : mvn-cache
118127 if : ${{ needs.bulk-filter.outputs.runnable == 'true' }}
119128 with :
@@ -135,7 +144,9 @@ jobs:
135144 outputs :
136145 packages : ${{ steps.filter.outputs.changes }}
137146 steps :
138- - uses : actions/checkout@v6
147+ - uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
148+ with :
149+ persist-credentials : false
139150 - uses : dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
140151 id : filter
141152 with :
@@ -233,8 +244,10 @@ jobs:
233244 - name : Get current week within the year
234245 id : date
235246 run : echo "::set-output name=week_of_year::$(date +'%W' --utc)"
236- - uses : actions/checkout@v4
237- - uses : actions/setup-java@v4
247+ - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
248+ with :
249+ persist-credentials : false
250+ - uses : actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
238251 with :
239252 distribution : temurin
240253 java-version : ${{matrix.java}}
@@ -256,14 +269,16 @@ jobs:
256269 - name : Get current week within the year
257270 id : date
258271 run : echo "::set-output name=week_of_year::$(date +'%W' --utc)"
259- - uses : actions/checkout@v4
260- - uses : actions/setup-java@v4
272+ - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
273+ with :
274+ persist-credentials : false
275+ - uses : actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
261276 with :
262277 java-version : 11
263278 distribution : temurin
264279 cache : maven
265280 - run : java -version
266- - uses : actions/cache@v4
281+ - uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
267282 id : mvn-cache
268283 with :
269284 path : ~/.m2/repository
@@ -274,7 +289,7 @@ jobs:
274289 env :
275290 BUILD_SUBDIR : ${{matrix.package}}
276291 JOB_TYPE : install
277- - uses : actions/setup-java@v4
292+ - uses : actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
278293 with :
279294 java-version : ${{matrix.java}}
280295 distribution : temurin
@@ -301,8 +316,10 @@ jobs:
301316 matrix :
302317 package : ${{ fromJSON(needs.changes.outputs.packages) }}
303318 steps :
304- - uses : actions/checkout@v4
305- - uses : actions/setup-java@v4
319+ - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
320+ with :
321+ persist-credentials : false
322+ - uses : actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
306323 with :
307324 distribution : temurin
308325 java-version : 11
@@ -318,8 +335,10 @@ jobs:
318335 matrix :
319336 package : ${{ fromJSON(needs.changes.outputs.packages) }}
320337 steps :
321- - uses : actions/checkout@v4
322- - uses : actions/setup-java@v4
338+ - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
339+ with :
340+ persist-credentials : false
341+ - uses : actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
323342 with :
324343 distribution : temurin
325344 java-version : 17
@@ -344,8 +363,10 @@ jobs:
344363 steps :
345364 - name : Support longpaths
346365 run : git config --system core.longpaths true
347- - uses : actions/checkout@v4
348- - uses : actions/setup-java@v4
366+ - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
367+ with :
368+ persist-credentials : false
369+ - uses : actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
349370 with :
350371 distribution : temurin
351372 java-version : 11
@@ -360,10 +381,11 @@ jobs:
360381 if : ${{ needs.bulk-filter.outputs.runnable == 'true' }}
361382 runs-on : ubuntu-latest
362383 steps :
363- - uses : actions/checkout@v4
384+ - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
364385 with :
365386 fetch-depth : 0
366- - uses : actions/setup-java@v4
387+ persist-credentials : false
388+ - uses : actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
367389 with :
368390 distribution : temurin
369391 java-version : 17
@@ -381,8 +403,10 @@ jobs:
381403 - name : Get current week within the year
382404 id : date
383405 run : echo "::set-output name=week_of_year::$(date +'%W' --utc)"
384- - uses : actions/checkout@v4
385- - uses : actions/setup-java@v4
406+ - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
407+ with :
408+ persist-credentials : false
409+ - uses : actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
386410 with :
387411 distribution : temurin
388412 java-version : 11
@@ -399,8 +423,10 @@ jobs:
399423 if : ${{ needs.bulk-filter.outputs.runnable == 'true' }}
400424 runs-on : ubuntu-latest
401425 steps :
402- - uses : actions/checkout@v4
403- - uses : actions/setup-java@v4
426+ - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
427+ with :
428+ persist-credentials : false
429+ - uses : actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
404430 with :
405431 java-version : 11
406432 distribution : temurin
@@ -410,7 +436,7 @@ jobs:
410436 env :
411437 JOB_TYPE : install
412438 - name : Validate gapic-libraries-bom
413- uses : googleapis/java-cloud-bom/tests/validate-bom@v26.79.0
439+ uses : googleapis/java-cloud-bom/tests/validate-bom@377c8d1fac6b1521dc52a10f4d02e5d371a0de67 # v26.79.0
414440 with :
415441 bom-path : gapic-libraries-bom/pom.xml
416442
0 commit comments