2020 steps :
2121 - name : Checkout Repo
2222 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
23+ with :
24+ persist-credentials : false
2325 - name : Setup Go
2426 uses : actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
2527 with :
3335 ~/go/bin
3436 ~/go/pkg/mod
3537 key : go-cache-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/go.sum') }}
38+ lookup-only : true
3639 - name : Install dependencies
3740 if : steps.go-cache.outputs.cache-hit != 'true'
3841 run : make gomoddownload
4346 steps :
4447 - name : Checkout Repo
4548 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
49+ with :
50+ persist-credentials : false
4651 - name : Setup Go
4752 uses : actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
4853 with :
5661 ~/go/bin
5762 ~/go/pkg/mod
5863 key : go-cache-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/go.sum') }}
64+ lookup-only : true
5965 - name : golint
6066 run : make -j2 golint
6167 - name : goimpi
6874 steps :
6975 - name : Checkout Repo
7076 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
77+ with :
78+ persist-credentials : false
7179 - name : Setup Go
7280 uses : actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
7381 with :
8189 ~/go/bin
8290 ~/go/pkg/mod
8391 key : go-cache-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/go.sum') }}
92+ lookup-only : true
8493 - name : Run `govulncheck`
8594 run : make govulncheck
8695
9099 steps :
91100 - name : Checkout Repo
92101 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
102+ with :
103+ persist-credentials : false
93104 - name : Setup Go
94105 uses : actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
95106 with :
@@ -103,6 +114,7 @@ jobs:
103114 ~/go/bin
104115 ~/go/pkg/mod
105116 key : go-cache-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/go.sum') }}
117+ lookup-only : true
106118 - name : Setup Node
107119 uses : actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
108120 with :
@@ -162,6 +174,8 @@ jobs:
162174 steps :
163175 - name : Checkout Repo
164176 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
177+ with :
178+ persist-credentials : false
165179 - name : Setup Go
166180 uses : actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
167181 with :
@@ -175,11 +189,13 @@ jobs:
175189 ~/go/bin
176190 ~/go/pkg/mod
177191 key : go-cache-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/go.sum') }}
192+ lookup-only : true
178193 - name : Cache Build
179194 uses : actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
180195 with :
181196 path : ~/.cache/go-build
182197 key : unittest-${{ runner.os }}-${{ matrix.runner }}-go-build-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}
198+ lookup-only : true
183199 - name : Run Unit Tests
184200 run : |
185201 make -j4 gotest-with-junit
@@ -194,23 +210,29 @@ jobs:
194210 needs : [setup-environment, unittest-matrix]
195211 steps :
196212 - name : Print result
197- run : echo ${{ needs.unittest-matrix.result }}
213+ run : echo ${NEEDS_UNITTEST_MATRIX_RESULT}
214+ env :
215+ NEEDS_UNITTEST_MATRIX_RESULT : ${{ needs.unittest-matrix.result }}
198216 - name : Interpret result
199217 run : |
200- if [[ success == ${{ needs.unittest-matrix.result }} ]]
218+ if [[ success == "${NEEDS_UNITTEST_MATRIX_RESULT}" ]]
201219 then
202220 echo "All matrix jobs passed!"
203221 else
204222 echo "One or more matrix jobs failed."
205223 false
206224 fi
225+ env :
226+ NEEDS_UNITTEST_MATRIX_RESULT : ${{ needs.unittest-matrix.result }}
207227
208228 test-coverage :
209229 runs-on : ubuntu-latest
210230 needs : [setup-environment]
211231 steps :
212232 - name : Checkout Repo
213233 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
234+ with :
235+ persist-credentials : false
214236 - name : Setup Go
215237 uses : actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
216238 with :
@@ -224,11 +246,13 @@ jobs:
224246 ~/go/bin
225247 ~/go/pkg/mod
226248 key : go-cache-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/go.sum') }}
249+ lookup-only : true
227250 - name : Cache Build
228251 uses : actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
229252 with :
230253 path : ~/.cache/go-build
231254 key : coverage-${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
255+ lookup-only : true
232256 - name : Run Unit Tests With Coverage
233257 run : make gotest-with-cover
234258 - name : Upload coverage report
@@ -281,6 +305,8 @@ jobs:
281305 steps :
282306 - name : Checkout Repo
283307 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
308+ with :
309+ persist-credentials : false
284310 - name : Setup Go
285311 uses : actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
286312 with :
@@ -294,6 +320,7 @@ jobs:
294320 ~/go/bin
295321 ~/go/pkg/mod
296322 key : go-cache-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/go.sum') }}
323+ lookup-only : true
297324 - name : Build
298325 env :
299326 GOOS : ${{matrix.goos}}
0 commit comments