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 :
@@ -263,8 +274,10 @@ jobs:
263274 - name : Get current week within the year
264275 id : date
265276 run : echo "::set-output name=week_of_year::$(date +'%W' --utc)"
266- - uses : actions/checkout@v4
267- - uses : actions/setup-java@v4
277+ - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
278+ with :
279+ persist-credentials : false
280+ - uses : actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
268281 with :
269282 distribution : temurin
270283 java-version : ${{matrix.java}}
@@ -286,14 +299,16 @@ jobs:
286299 - name : Get current week within the year
287300 id : date
288301 run : echo "::set-output name=week_of_year::$(date +'%W' --utc)"
289- - uses : actions/checkout@v4
290- - uses : actions/setup-java@v4
302+ - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
303+ with :
304+ persist-credentials : false
305+ - uses : actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
291306 with :
292307 java-version : 11
293308 distribution : temurin
294309 cache : maven
295310 - run : java -version
296- - uses : actions/cache@v4
311+ - uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
297312 id : mvn-cache
298313 with :
299314 path : ~/.m2/repository
@@ -304,7 +319,7 @@ jobs:
304319 env :
305320 BUILD_SUBDIR : ${{matrix.package}}
306321 JOB_TYPE : install
307- - uses : actions/setup-java@v4
322+ - uses : actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
308323 with :
309324 java-version : ${{matrix.java}}
310325 distribution : temurin
@@ -331,8 +346,10 @@ jobs:
331346 matrix :
332347 package : ${{ fromJSON(needs.changes.outputs.packages) }}
333348 steps :
334- - uses : actions/checkout@v4
335- - uses : actions/setup-java@v4
349+ - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
350+ with :
351+ persist-credentials : false
352+ - uses : actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
336353 with :
337354 distribution : temurin
338355 java-version : 11
@@ -348,8 +365,10 @@ jobs:
348365 matrix :
349366 package : ${{ fromJSON(needs.changes.outputs.packages) }}
350367 steps :
351- - uses : actions/checkout@v4
352- - uses : actions/setup-java@v4
368+ - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
369+ with :
370+ persist-credentials : false
371+ - uses : actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
353372 with :
354373 distribution : temurin
355374 java-version : 17
@@ -374,8 +393,10 @@ jobs:
374393 steps :
375394 - name : Support longpaths
376395 run : git config --system core.longpaths true
377- - uses : actions/checkout@v4
378- - uses : actions/setup-java@v4
396+ - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
397+ with :
398+ persist-credentials : false
399+ - uses : actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
379400 with :
380401 distribution : temurin
381402 java-version : 11
@@ -390,10 +411,11 @@ jobs:
390411 if : ${{ needs.bulk-filter.outputs.runnable == 'true' }}
391412 runs-on : ubuntu-latest
392413 steps :
393- - uses : actions/checkout@v4
414+ - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
394415 with :
395416 fetch-depth : 0
396- - uses : actions/setup-java@v4
417+ persist-credentials : false
418+ - uses : actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
397419 with :
398420 distribution : temurin
399421 java-version : 17
@@ -411,8 +433,10 @@ jobs:
411433 - name : Get current week within the year
412434 id : date
413435 run : echo "::set-output name=week_of_year::$(date +'%W' --utc)"
414- - uses : actions/checkout@v4
415- - uses : actions/setup-java@v4
436+ - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
437+ with :
438+ persist-credentials : false
439+ - uses : actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
416440 with :
417441 distribution : temurin
418442 java-version : 11
@@ -429,8 +453,10 @@ jobs:
429453 if : ${{ needs.bulk-filter.outputs.runnable == 'true' }}
430454 runs-on : ubuntu-latest
431455 steps :
432- - uses : actions/checkout@v4
433- - uses : actions/setup-java@v4
456+ - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
457+ with :
458+ persist-credentials : false
459+ - uses : actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
434460 with :
435461 java-version : 11
436462 distribution : temurin
@@ -440,7 +466,7 @@ jobs:
440466 env :
441467 JOB_TYPE : install
442468 - name : Validate gapic-libraries-bom
443- uses : googleapis/java-cloud-bom/tests/validate-bom@v26.79.0
469+ uses : googleapis/java-cloud-bom/tests/validate-bom@377c8d1fac6b1521dc52a10f4d02e5d371a0de67 # v26.79.0
444470 with :
445471 bom-path : gapic-libraries-bom/pom.xml
446472
0 commit comments