Skip to content

Commit 3e6d2c1

Browse files
authored
Update dependencies (#3171)
1 parent ef87e9f commit 3e6d2c1

32 files changed

+478
-388
lines changed

.github/workflows/edge.yml

Lines changed: 45 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,18 @@ jobs:
4545
runs-on: ubuntu-20.04
4646
steps:
4747
- name: Checkout Repository
48-
uses: actions/checkout@v2
48+
uses: actions/checkout@v3
4949
with:
5050
fetch-depth: 0
5151
- name: Output Variables
5252
id: commit
5353
run: |
5454
echo "::set-output name=sha::$(echo ${GITHUB_SHA} | cut -c1-7)"
55-
- name: Determine Go version from go.mod
56-
run: echo "GO_VERSION=$(grep "go 1." go.mod | cut -d " " -f 2)" >> $GITHUB_ENV
5755
- name: Setup Golang Environment
58-
uses: actions/setup-go@v2
56+
uses: actions/setup-go@v3
5957
with:
60-
go-version: ${{ env.GO_VERSION }}
58+
go-version-file: go.mod
59+
cache: true
6160
- name: Determine GOPATH
6261
run: echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
6362
- name: Check if CRDs changed
@@ -70,7 +69,7 @@ jobs:
7069
uses: goreleaser/goreleaser-action@v2
7170
with:
7271
version: latest
73-
args: --rm-dist --debug --skip-publish --snapshot
72+
args: build --snapshot --rm-dist --single-target
7473
env:
7574
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7675
GOPATH: ${{ env.GOPATH }}
@@ -85,13 +84,12 @@ jobs:
8584
runs-on: ubuntu-20.04
8685
steps:
8786
- name: Checkout Repository
88-
uses: actions/checkout@v2
89-
- name: Determine Go version from go.mod
90-
run: echo "GO_VERSION=$(grep "go 1." go.mod | cut -d " " -f 2)" >> $GITHUB_ENV
87+
uses: actions/checkout@v3
9188
- name: Setup Golang Environment
92-
uses: actions/setup-go@v2
89+
uses: actions/setup-go@v3
9390
with:
94-
go-version: ${{ env.GO_VERSION }}
91+
go-version-file: go.mod
92+
cache: true
9593
- name: Run Tests
9694
run: go test ./...
9795

@@ -105,7 +103,7 @@ jobs:
105103
image: [debian, alpine, opentracing, ubi]
106104
steps:
107105
- name: Checkout Repository
108-
uses: actions/checkout@v2
106+
uses: actions/checkout@v3
109107
- name: Output Variables
110108
id: commit
111109
run: |
@@ -116,41 +114,36 @@ jobs:
116114
path: ${{ github.workspace }}/dist
117115
key: nginx-ingress-${{ github.run_id }}-${{ github.run_number }}
118116
- name: Docker Buildx
119-
uses: docker/setup-buildx-action@v1
120-
- name: Cache Docker layers for ${{ matrix.image }}
121-
uses: actions/cache@v2
122-
with:
123-
path: /tmp/.buildx-${{ matrix.image }}-cache
124-
key: ${{ runner.os }}-buildx-${{ matrix.image }}-${{ github.sha }}
125-
restore-keys: |
126-
${{ runner.os }}-buildx-${{ matrix.image }}-
117+
uses: docker/setup-buildx-action@v2
127118
- name: Build ${{ matrix.image }} Container
128-
uses: docker/build-push-action@v2
119+
uses: docker/build-push-action@v3
129120
with:
130121
file: build/Dockerfile
131122
context: '.'
132-
cache-from: type=local,src=/tmp/.buildx-${{ matrix.image }}-cache
133-
cache-to: type=local,dest=/tmp/.buildx-${{ matrix.image }}-cache
123+
cache-from: type=gha,scope=${{ matrix.image }}
124+
cache-to: type=gha,scope=${{ matrix.image }},mode=max
134125
target: goreleaser
135126
tags: ${{ matrix.image }}:${{ github.sha }}
136127
load: true
137128
build-args: |
138129
BUILD_OS=${{ matrix.image }}
139130
NGINX_VERSION=${{ steps.commit.outputs.nginx_version }}
140131
- name: Run Trivy vulnerability scanner
141-
uses: aquasecurity/trivy-action@master
132+
uses: aquasecurity/[email protected]
133+
continue-on-error: true
142134
with:
143135
image-ref: '${{ matrix.image }}:${{ github.sha }}'
144-
format: 'template'
145-
template: '@/contrib/sarif.tpl'
136+
format: 'sarif'
146137
output: 'trivy-results-${{ matrix.image }}.sarif'
147138
ignore-unfixed: 'true'
148139
- name: Upload Trivy scan results to GitHub Security tab
149-
uses: github/codeql-action/upload-sarif@v1
140+
uses: github/codeql-action/upload-sarif@v2
141+
continue-on-error: true
150142
with:
151143
sarif_file: 'trivy-results-${{ matrix.image }}.sarif'
152144
- name: Upload Scan Results
153-
uses: actions/upload-artifact@v2
145+
uses: actions/upload-artifact@v3
146+
continue-on-error: true
154147
with:
155148
name: 'trivy-results-${{ matrix.image }}.sarif'
156149
path: 'trivy-results-${{ matrix.image }}.sarif'
@@ -176,7 +169,7 @@ jobs:
176169
marker: 'policies'
177170
steps:
178171
- name: Checkout Repository
179-
uses: actions/checkout@v2
172+
uses: actions/checkout@v3
180173
- name: Output Variables
181174
id: commit
182175
run: |
@@ -187,34 +180,27 @@ jobs:
187180
path: ${{ github.workspace }}/dist
188181
key: nginx-ingress-${{ github.run_id }}-${{ github.run_number }}
189182
- name: Docker Buildx
190-
uses: docker/setup-buildx-action@v1
191-
- name: Cache Docker layers for ${{ matrix.image }}
192-
uses: actions/cache@v2
193-
with:
194-
path: /tmp/.buildx-${{ matrix.image }}-cache
195-
key: ${{ runner.os }}-buildx-${{ matrix.image }}-${{ github.sha }}
196-
restore-keys: |
197-
${{ runner.os }}-buildx-${{ matrix.image }}-
183+
uses: docker/setup-buildx-action@v2
198184
- name: Build ${{ matrix.image }} Container
199-
uses: docker/build-push-action@v2
185+
uses: docker/build-push-action@v3
200186
with:
201187
file: build/Dockerfile
202188
context: '.'
203-
cache-from: type=local,src=/tmp/.buildx-${{ matrix.image }}-cache
204-
cache-to: type=local,dest=/tmp/.buildx-${{ matrix.image }}-cache
189+
cache-from: type=gha,scope=${{ matrix.image }}
190+
cache-to: type=gha,scope=${{ matrix.image }},mode=max
205191
target: goreleaser
206192
tags: ${{ matrix.image }}:${{ github.sha }}
207193
load: true
208194
build-args: |
209195
BUILD_OS=${{ matrix.image }}
210196
NGINX_VERSION=${{ steps.commit.outputs.nginx_version }}
211197
- name: Build Test-Runner Container
212-
uses: docker/build-push-action@v2
198+
uses: docker/build-push-action@v3
213199
with:
214200
file: tests/docker/Dockerfile
215201
context: '.'
216-
cache-from: type=local,src=/tmp/.buildx-cache
217-
cache-to: type=local,dest=/tmp/.buildx-cache
202+
cache-from: type=gha,scope=test-runner
203+
cache-to: type=gha,scope=test-runner,mode=max
218204
tags: test-runner:${{ github.sha }}
219205
load: true
220206
- name: Deploy Kubernetes
@@ -246,7 +232,7 @@ jobs:
246232
-m ${{ matrix.marker }}
247233
working-directory: ./tests
248234
- name: Upload Test Results
249-
uses: actions/upload-artifact@v2
235+
uses: actions/upload-artifact@v3
250236
with:
251237
name: test-results-${{ steps.k8s.outputs.cluster }}
252238
path: ${{ github.workspace }}/tests/tests-${{ steps.k8s.outputs.cluster }}.html
@@ -263,30 +249,23 @@ jobs:
263249
HELM_HTTP_POSTFIX: s
264250
steps:
265251
- name: Checkout Repository
266-
uses: actions/checkout@v2
252+
uses: actions/checkout@v3
267253
- name: Fetch Cached Artifacts
268254
uses: actions/cache@v2
269255
with:
270256
path: ${{ github.workspace }}/dist
271257
key: nginx-ingress-${{ github.run_id }}-${{ github.run_number }}
272258
- name: Docker Buildx
273-
uses: docker/setup-buildx-action@v1
259+
uses: docker/setup-buildx-action@v2
274260
with:
275261
driver-opts: network=host
276-
- name: Docker build cache
277-
uses: actions/cache@v2
278-
with:
279-
path: /tmp/.buildx-cache
280-
key: ${{ runner.os }}-buildx-${{ github.sha }}
281-
restore-keys: |
282-
${{ runner.os }}-buildx-
283262
- name: Build Docker Image nginx-ingress
284-
uses: docker/build-push-action@v2
263+
uses: docker/build-push-action@v3
285264
with:
286265
file: build/Dockerfile
287266
context: '.'
288-
cache-from: type=local,src=/tmp/.buildx-cache
289-
cache-to: type=local,dest=/tmp/.buildx-cache
267+
cache-from: type=gha,scope=debian
268+
cache-to: type=gha,scope=debian,mode=max
290269
target: goreleaser
291270
tags: nginx-ingress:${{ github.sha }}
292271
load: true
@@ -339,7 +318,7 @@ jobs:
339318
platforms: linux/arm64,linux/amd64
340319
steps:
341320
- name: Checkout Repository
342-
uses: actions/checkout@v2
321+
uses: actions/checkout@v3
343322
with:
344323
fetch-depth: 0
345324
- name: Output Variables
@@ -355,30 +334,23 @@ jobs:
355334
path: ${{ github.workspace }}/dist
356335
key: nginx-ingress-${{ github.run_id }}-${{ github.run_number }}
357336
- name: Setup QEMU
358-
uses: docker/setup-qemu-action@v1
337+
uses: docker/setup-qemu-action@v2
359338
with:
360339
platforms: arm,arm64,ppc64le,s390x
361340
- name: Docker Buildx
362-
uses: docker/setup-buildx-action@v1
363-
- name: Cache Docker layers for ${{ matrix.image }}
364-
uses: actions/cache@v2
365-
with:
366-
path: /tmp/.buildx-${{ matrix.image }}-cache
367-
key: ${{ runner.os }}-buildx-${{ matrix.image }}-${{ github.sha }}
368-
restore-keys: |
369-
${{ runner.os }}-buildx-${{ matrix.image }}-
341+
uses: docker/setup-buildx-action@v2
370342
- name: DockerHub Login
371-
uses: docker/login-action@v1
343+
uses: docker/login-action@v2
372344
with:
373345
username: ${{ secrets.DOCKER_USERNAME }}
374346
password: ${{ secrets.DOCKER_PASSWORD }}
375347
- name: Push to Dockerhub
376-
uses: docker/build-push-action@v2
348+
uses: docker/build-push-action@v3
377349
with:
378350
file: build/Dockerfile
379351
context: '.'
380-
cache-from: type=local,src=/tmp/.buildx-${{ matrix.image }}-cache
381-
cache-to: type=local,dest=/tmp/.buildx-${{ matrix.image }}-cache
352+
cache-from: type=gha,scope=${{ matrix.type }}
353+
cache-to: type=gha,scope=${{ matrix.type }},mode=max
382354
target: goreleaser
383355
tags: nginx/nginx-ingress:${{ matrix.tag }}
384356
platforms: ${{ matrix.platforms }}
@@ -397,15 +369,15 @@ jobs:
397369
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
398370
steps:
399371
- name: Checkout Repository
400-
uses: actions/checkout@v2
372+
uses: actions/checkout@v3
401373
- name: Lint
402374
run: |
403375
helm lint ${{ env.HELM_CHART_DIR }} || true
404376
- name: Package
405377
run: |
406378
helm package --version ${{ env.HELM_CHART_VERSION }} ${{ env.HELM_CHART_DIR }}
407379
- name: Upload Chart
408-
uses: actions/upload-artifact@v2
380+
uses: actions/upload-artifact@v3
409381
with:
410382
name: helm-chart
411383
path: ${{ github.workspace }}/nginx-ingress-${{ env.HELM_CHART_VERSION }}.tgz
@@ -417,7 +389,7 @@ jobs:
417389
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
418390
steps:
419391
- name: Checkout Repository
420-
uses: actions/checkout@v2
392+
uses: actions/checkout@v3
421393
with:
422394
repository: nginxinc/helm-charts
423395
fetch-depth: 1

0 commit comments

Comments
 (0)