12
12
13
13
env :
14
14
# Golang version to use across CI steps
15
- GOLANG_VERSION : ' 1.17'
16
-
17
- permissions :
18
- contents : read
15
+ GOLANG_VERSION : ' 1.18'
19
16
20
17
concurrency :
21
18
group : ${{ github.workflow }}-${{ github.ref }}
27
24
runs-on : ubuntu-latest
28
25
steps :
29
26
- name : Checkout code
30
- uses : actions/checkout@v3
27
+ uses : actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
31
28
- name : Setup Golang
32
- uses : actions/setup-go@v3
29
+ uses : actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
33
30
with :
34
31
go-version : ${{ env.GOLANG_VERSION }}
35
32
- name : Download all Go modules
@@ -45,13 +42,13 @@ jobs:
45
42
runs-on : ubuntu-latest
46
43
steps :
47
44
- name : Checkout code
48
- uses : actions/checkout@v3
45
+ uses : actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
49
46
- name : Setup Golang
50
- uses : actions/setup-go@v3
47
+ uses : actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
51
48
with :
52
49
go-version : ${{ env.GOLANG_VERSION }}
53
50
- name : Restore go build cache
54
- uses : actions/cache@v3
51
+ uses : actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # v3.0.11
55
52
with :
56
53
path : ~/.cache/go-build
57
54
key : ${{ runner.os }}-go-build-v1-${{ github.run_id }}
69
66
runs-on : ubuntu-latest
70
67
steps :
71
68
- name : Checkout code
72
- uses : actions/checkout@v3
69
+ uses : actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
73
70
- name : Run golangci-lint
74
- uses : golangci/golangci-lint-action@v3
71
+ uses : golangci/golangci-lint-action@0ad9a0988b3973e851ab0a07adf248ec2e100376 # v3.3.1
75
72
with :
76
73
version : v1.46.2
77
74
args : --timeout 10m --exclude SA5011 --verbose
@@ -85,11 +82,11 @@ jobs:
85
82
- name : Create checkout directory
86
83
run : mkdir -p ~/go/src/github.com/argoproj
87
84
- name : Checkout code
88
- uses : actions/checkout@v3
85
+ uses : actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
89
86
- name : Create symlink in GOPATH
90
87
run : ln -s $(pwd) ~/go/src/github.com/argoproj/argo-cd
91
88
- name : Setup Golang
92
- uses : actions/setup-go@v3
89
+ uses : actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
93
90
with :
94
91
go-version : ${{ env.GOLANG_VERSION }}
95
92
- name : Install required packages
@@ -109,7 +106,7 @@ jobs:
109
106
run : |
110
107
echo "/usr/local/bin" >> $GITHUB_PATH
111
108
- name : Restore go build cache
112
- uses : actions/cache@v3
109
+ uses : actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # v3.0.11
113
110
with :
114
111
path : ~/.cache/go-build
115
112
key : ${{ runner.os }}-go-build-v1-${{ github.run_id }}
@@ -126,12 +123,12 @@ jobs:
126
123
- name : Run all unit tests
127
124
run : make test-local
128
125
- name : Generate code coverage artifacts
129
- uses : actions/upload-artifact@v3
126
+ uses : actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3.1.1
130
127
with :
131
128
name : code-coverage
132
129
path : coverage.out
133
130
- name : Generate test results artifacts
134
- uses : actions/upload-artifact@v3
131
+ uses : actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3.1.1
135
132
with :
136
133
name : test-results
137
134
path : test-results/
@@ -145,11 +142,11 @@ jobs:
145
142
- name : Create checkout directory
146
143
run : mkdir -p ~/go/src/github.com/argoproj
147
144
- name : Checkout code
148
- uses : actions/checkout@v3
145
+ uses : actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
149
146
- name : Create symlink in GOPATH
150
147
run : ln -s $(pwd) ~/go/src/github.com/argoproj/argo-cd
151
148
- name : Setup Golang
152
- uses : actions/setup-go@v3
149
+ uses : actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
153
150
with :
154
151
go-version : ${{ env.GOLANG_VERSION }}
155
152
- name : Install required packages
@@ -169,7 +166,7 @@ jobs:
169
166
run : |
170
167
echo "/usr/local/bin" >> $GITHUB_PATH
171
168
- name : Restore go build cache
172
- uses : actions/cache@v3
169
+ uses : actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # v3.0.11
173
170
with :
174
171
path : ~/.cache/go-build
175
172
key : ${{ runner.os }}-go-build-v1-${{ github.run_id }}
@@ -186,7 +183,7 @@ jobs:
186
183
- name : Run all unit tests
187
184
run : make test-race-local
188
185
- name : Generate test results artifacts
189
- uses : actions/upload-artifact@v3
186
+ uses : actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3.1.1
190
187
with :
191
188
name : race-results
192
189
path : test-results/
@@ -196,9 +193,9 @@ jobs:
196
193
runs-on : ubuntu-latest
197
194
steps :
198
195
- name : Checkout code
199
- uses : actions/checkout@v3
196
+ uses : actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
200
197
- name : Setup Golang
201
- uses : actions/setup-go@v3
198
+ uses : actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
202
199
with :
203
200
go-version : ${{ env.GOLANG_VERSION }}
204
201
- name : Create symlink in GOPATH
@@ -243,14 +240,14 @@ jobs:
243
240
runs-on : ubuntu-latest
244
241
steps :
245
242
- name : Checkout code
246
- uses : actions/checkout@v3
243
+ uses : actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
247
244
- name : Setup NodeJS
248
- uses : actions/setup-node@v3
245
+ uses : actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1
249
246
with :
250
247
node-version : ' 12.18.4'
251
248
- name : Restore node dependency cache
252
249
id : cache-dependencies
253
- uses : actions/cache@v3
250
+ uses : actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # v3.0.11
254
251
with :
255
252
path : ui/node_modules
256
253
key : ${{ runner.os }}-node-dep-v2-${{ hashFiles('**/yarn.lock') }}
@@ -280,12 +277,12 @@ jobs:
280
277
sonar_secret : ${{ secrets.SONAR_TOKEN }}
281
278
steps :
282
279
- name : Checkout code
283
- uses : actions/checkout@v3
280
+ uses : actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
284
281
with :
285
282
fetch-depth : 0
286
283
- name : Restore node dependency cache
287
284
id : cache-dependencies
288
- uses : actions/cache@v3
285
+ uses : actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # v3.0.11
289
286
with :
290
287
path : ui/node_modules
291
288
key : ${{ runner.os }}-node-dep-v2-${{ hashFiles('**/yarn.lock') }}
@@ -296,16 +293,16 @@ jobs:
296
293
run : |
297
294
mkdir -p test-results
298
295
- name : Get code coverage artifiact
299
- uses : actions/download-artifact@v3
296
+ uses : actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # v3.0.1
300
297
with :
301
298
name : code-coverage
302
299
- name : Get test result artifact
303
- uses : actions/download-artifact@v3
300
+ uses : actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # v3.0.1
304
301
with :
305
302
name : test-results
306
303
path : test-results
307
304
- name : Upload code coverage information to codecov.io
308
- uses : codecov/codecov-action@v3
305
+ uses : codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # v3.1.1
309
306
with :
310
307
file : coverage.out
311
308
- name : Perform static code analysis using SonarCloud
@@ -356,9 +353,9 @@ jobs:
356
353
ARGOCD_SERVER : " 127.0.0.1:8088"
357
354
steps :
358
355
- name : Checkout code
359
- uses : actions/checkout@v3
356
+ uses : actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
360
357
- name : Setup Golang
361
- uses : actions/setup-go@v3
358
+ uses : actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
362
359
with :
363
360
go-version : ${{ env.GOLANG_VERSION }}
364
361
- name : GH actions workaround - Kill XSP4 process
@@ -376,7 +373,7 @@ jobs:
376
373
sudo chown runner $HOME/.kube/config
377
374
kubectl version
378
375
- name : Restore go build cache
379
- uses : actions/cache@v3
376
+ uses : actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # v3.0.11
380
377
with :
381
378
path : ~/.cache/go-build
382
379
key : ${{ runner.os }}-go-build-v1-${{ github.run_id }}
@@ -432,7 +429,7 @@ jobs:
432
429
set -x
433
430
make test-e2e-local
434
431
- name : Upload e2e-server logs
435
- uses : actions/upload-artifact@v3
432
+ uses : actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3.1.1
436
433
with :
437
434
name : e2e-server-k8s${{ matrix.k3s-version }}.log
438
435
path : /tmp/e2e-server.log
0 commit comments