Skip to content

Commit ad52e4b

Browse files
authored
Merge branch 'main' into chore/add-helm-label
2 parents 501d1ff + 02b5896 commit ad52e4b

File tree

63 files changed

+617
-496
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+617
-496
lines changed

.github/workflows/build-plus.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ jobs:
117117
secrets: |
118118
"nginx-repo.crt=${{ inputs.nap_modules != '' && secrets.NGINX_AP_CRT || secrets.NGINX_CRT }}"
119119
"nginx-repo.key=${{ inputs.nap_modules != '' && secrets.NGINX_AP_KEY || secrets.NGINX_KEY }}"
120+
${{ inputs.nap_modules != '' && contains(inputs.image, 'ubi') && format('"rhel_license={0}"', secrets.RHEL_LICENSE) || '' }}
120121
121122
- name: Load image for Trivy
122123
uses: docker/build-push-action@v3
@@ -136,6 +137,7 @@ jobs:
136137
secrets: |
137138
"nginx-repo.crt=${{ inputs.nap_modules != '' && secrets.NGINX_AP_CRT || secrets.NGINX_CRT }}"
138139
"nginx-repo.key=${{ inputs.nap_modules != '' && secrets.NGINX_AP_KEY || secrets.NGINX_KEY }}"
140+
${{ inputs.nap_modules != '' && contains(inputs.image, 'ubi') && format('"rhel_license={0}"', secrets.RHEL_LICENSE) || '' }}
139141
140142
- name: Run Trivy vulnerability scanner
141143
uses: aquasecurity/[email protected]

.github/workflows/ci.yml

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ jobs:
4040
k8s_latest: ${{ steps.vars.outputs.k8s_latest }}
4141
steps:
4242
- name: Checkout Repository
43-
uses: actions/checkout@v3
43+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
4444
- name: Output Variables
4545
id: vars
4646
run: |
4747
echo "k8s_latest=$(grep -m1 'FROM kindest/node' <tests/docker/Dockerfile | awk -F'[:v]' '{print $3}')" >> $GITHUB_OUTPUT
4848
- name: Setup Golang Environment
49-
uses: actions/setup-go@v3
49+
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
5050
with:
5151
go-version-file: go.mod
5252
cache: true
@@ -71,16 +71,16 @@ jobs:
7171
needs: checks
7272
steps:
7373
- name: Checkout Repository
74-
uses: actions/checkout@v3
74+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
7575
with:
7676
fetch-depth: 0
7777
- name: Setup Golang Environment
78-
uses: actions/setup-go@v3
78+
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
7979
with:
8080
go-version-file: go.mod
8181
cache: true
8282
- name: Build binary
83-
uses: goreleaser/goreleaser-action@v3
83+
uses: goreleaser/goreleaser-action@b508e2e3ef3b19d4e4146d4f8fb3ba9db644a757 # v3.2.0
8484
with:
8585
version: latest
8686
args: build --snapshot --rm-dist --single-target --id kubernetes-ingress
@@ -89,7 +89,7 @@ jobs:
8989
GOPATH: ${{ needs.checks.outputs.go_path }}
9090

9191
- name: Store Artifacts in Cache
92-
uses: actions/cache@v3
92+
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # v3.0.11
9393
with:
9494
path: ${{ github.workspace }}/dist
9595
key: nginx-ingress-${{ github.run_id }}-${{ github.run_number }}-single
@@ -100,16 +100,16 @@ jobs:
100100
needs: checks
101101
steps:
102102
- name: Checkout Repository
103-
uses: actions/checkout@v3
103+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
104104
- name: Setup Golang Environment
105-
uses: actions/setup-go@v3
105+
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
106106
with:
107107
go-version-file: go.mod
108108
cache: true
109109
- name: Run Tests
110110
run: make cover
111111
- name: Upload coverage to Codecov
112-
uses: codecov/codecov-action@v3
112+
uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # v3.1.1
113113
with:
114114
files: ./coverage.txt
115115

@@ -126,16 +126,16 @@ jobs:
126126
type: plus
127127
steps:
128128
- name: Checkout Repository
129-
uses: actions/checkout@v3
129+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
130130
- name: Fetch Cached Artifacts
131-
uses: actions/cache@v3
131+
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # v3.0.11
132132
with:
133133
path: ${{ github.workspace }}/dist
134134
key: nginx-ingress-${{ github.run_id }}-${{ github.run_number }}-single
135135
- name: Docker Buildx
136-
uses: docker/setup-buildx-action@v2
136+
uses: docker/setup-buildx-action@8c0edbc76e98fa90f69d9a2c020dcb50019dc325 # v2.2.1
137137
- name: Build Docker Image ${{ matrix.image }}
138-
uses: docker/build-push-action@v3
138+
uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5 # v3.2.0
139139
with:
140140
file: build/Dockerfile
141141
context: '.'
@@ -230,7 +230,7 @@ jobs:
230230
matrix: ${{ fromJSON(needs.setup-matrix.outputs.matrix) }}
231231
steps:
232232
- name: Checkout Repository
233-
uses: actions/checkout@v3
233+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
234234
- name: Run Smoke Tests
235235
id: smoke-tests
236236
uses: ./.github/actions/smoke-tests
@@ -241,7 +241,7 @@ jobs:
241241
nginx-crt: ${{ contains(matrix.images.image, 'nap') && secrets.NGINX_AP_CRT || secrets.NGINX_CRT }}
242242
nginx-key: ${{ contains(matrix.images.image, 'nap') && secrets.NGINX_AP_KEY || secrets.NGINX_KEY }}
243243
- name: Upload Test Results
244-
uses: actions/upload-artifact@v3
244+
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3.1.1
245245
with:
246246
name: ${{ steps.smoke-tests.outputs.test-results-name }}
247247
path: ${{ github.workspace }}/tests/${{ steps.smoke-tests.outputs.test-results-name }}.html
@@ -253,21 +253,21 @@ jobs:
253253
needs: [checks, smoke-tests, helm-tests]
254254
steps:
255255
- name: Checkout Repository
256-
uses: actions/checkout@v3
256+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
257257
with:
258258
fetch-depth: 0
259259
- name: Setup Golang Environment
260-
uses: actions/setup-go@v3
260+
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
261261
with:
262262
go-version-file: go.mod
263263
cache: true
264264

265-
- uses: actions/setup-node@v3
265+
- uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1
266266
- run: npm install js-yaml
267267
continue-on-error: true
268268
if: startsWith(github.ref, 'refs/tags/')
269269
- name: Publish release on tag
270-
uses: actions/github-script@v6
270+
uses: actions/github-script@d556feaca394842dc55e4734bf3bb9f685482fa0 # v6.3.3
271271
continue-on-error: true
272272
with:
273273
github-token: ${{secrets.GITHUB_TOKEN}}
@@ -306,10 +306,10 @@ jobs:
306306
if: startsWith(github.ref, 'refs/tags/')
307307

308308
- name: Download Syft
309-
uses: anchore/sbom-action/[email protected]
309+
uses: anchore/sbom-action/download-syft@06e109483e6aa305a2b2395eabae554e51530e1d # v0.13.1
310310

311311
- name: Build binaries
312-
uses: goreleaser/goreleaser-action@v3
312+
uses: goreleaser/goreleaser-action@b508e2e3ef3b19d4e4146d4f8fb3ba9db644a757 # v3.2.0
313313
with:
314314
version: latest
315315
args: ${{ startsWith(github.ref, 'refs/tags/') && 'release' || 'build --snapshot' }} ${{ github.event_name == 'pull_request' && '--single-target' || '' }} --rm-dist
@@ -330,7 +330,7 @@ jobs:
330330
AZURE_BUCKET_NAME: ${{ secrets.AZURE_BUCKET_NAME }}
331331

332332
- name: Store Artifacts in Cache
333-
uses: actions/cache@v3
333+
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # v3.0.11
334334
with:
335335
path: ${{ github.workspace }}/dist
336336
key: nginx-ingress-${{ github.run_id }}-${{ github.run_number }}-multi
@@ -378,7 +378,7 @@ jobs:
378378
strategy:
379379
fail-fast: false
380380
matrix:
381-
image: [debian-plus-nap]
381+
image: [debian-plus-nap, ubi-plus-nap]
382382
platforms: ["linux/amd64"]
383383
target: [goreleaser, aws]
384384
nap_modules: [dos, waf, "waf,dos"]
@@ -400,7 +400,7 @@ jobs:
400400
if: ${{ github.event_name == 'push' }}
401401
steps:
402402
- name: Checkout Repository
403-
uses: actions/checkout@v3
403+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
404404
- name: Output Variables
405405
id: var
406406
run: |
@@ -418,7 +418,7 @@ jobs:
418418
- name: Package
419419
run: helm package --version ${{ steps.var.outputs.helm_version }} ${{ env.HELM_CHART_DIR }}
420420
- name: Upload Chart
421-
uses: actions/upload-artifact@v3
421+
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3.1.1
422422
with:
423423
name: helm-chart
424424
path: ${{ github.workspace }}/nginx-ingress-${{ steps.var.outputs.helm_version }}.tgz
@@ -430,15 +430,15 @@ jobs:
430430
if: ${{ github.event_name == 'push' }}
431431
steps:
432432
- name: Checkout Repository
433-
uses: actions/checkout@v3
433+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
434434
with:
435435
repository: nginxinc/helm-charts
436436
fetch-depth: 1
437437
token: ${{ secrets.NGINX_PAT }}
438438
- name: Remove previous Chart
439439
run: rm -f ${{ github.workspace }}/${{ needs.package-helm.outputs.type }}/nginx-ingress-${{ needs.package-helm.outputs.version }}.tgz
440440
- name: Retrieve latest Helm Chart
441-
uses: actions/download-artifact@v3
441+
uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # v3.0.1
442442
with:
443443
name: helm-chart
444444
path: ${{ github.workspace }}/${{ needs.package-helm.outputs.type }}

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ jobs:
3232

3333
steps:
3434
- name: Checkout repository
35-
uses: actions/checkout@v3
35+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
3636

3737
# Initializes the CodeQL tools for scanning.
3838
- name: Initialize CodeQL
39-
uses: github/codeql-action/init@v2
39+
uses: github/codeql-action/init@678fc3afe258fb2e0cdc165ccf77b85719de7b3c # v2.1.33
4040
with:
4141
languages: ${{ matrix.language }}
4242
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -47,7 +47,7 @@ jobs:
4747
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
4848
# If this step fails, then you should remove it and run the build manually (see below)
4949
- name: Autobuild
50-
uses: github/codeql-action/autobuild@v2
50+
uses: github/codeql-action/autobuild@678fc3afe258fb2e0cdc165ccf77b85719de7b3c # v2.1.33
5151

5252
# ℹ️ Command-line programs to run using the OS shell.
5353
# 📚 https://git.io/JvXDl
@@ -61,4 +61,4 @@ jobs:
6161
# make release
6262

6363
- name: Perform CodeQL Analysis
64-
uses: github/codeql-action/analyze@v2
64+
uses: github/codeql-action/analyze@678fc3afe258fb2e0cdc165ccf77b85719de7b3c # v2.1.33

.github/workflows/dockerhub-description.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ jobs:
1717
runs-on: ubuntu-22.04
1818
if: ${{ github.event.repository.fork == false }}
1919
steps:
20-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
2121

2222
- name: Modify readme for DockerHub
2323
run: |
2424
sed -i '3,4d' README.md
2525
2626
- name: Docker Hub Description
27-
uses: peter-evans/dockerhub-description@v3
27+
uses: peter-evans/dockerhub-description@93b93397c27ed52b4055b8c6b2f8d92456ab3c56 # v3.1.2
2828
with:
2929
username: ${{ secrets.DOCKER_USERNAME }}
3030
password: ${{ secrets.DOCKER_PASSWORD }}

.github/workflows/fossa.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ jobs:
2424
if: ${{ github.event.repository.fork == false }}
2525
steps:
2626
- name: Checkout Repository
27-
uses: actions/checkout@v3
27+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
2828
- name: Scan
29-
uses: fossas/fossa-action@v1
29+
uses: fossas/fossa-action@f61a4c0c263690f2ddb54b9822a719c25a7b608f # v1.3.1
3030
with:
3131
api-key: ${{ secrets.FOSSA_TOKEN }}

.github/workflows/issues.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
echo "::set-output name=text::$text"
1919
- name: Check if Issue author is Org member
2020
id: membercheck
21-
uses: actions/github-script@v6
21+
uses: actions/github-script@d556feaca394842dc55e4734bf3bb9f685482fa0 # v6.3.3
2222
with:
2323
github-token: ${{ secrets.GITHUB_TOKEN }}
2424
script: |
@@ -36,7 +36,7 @@ jobs:
3636
}
3737
return member
3838
- name: Send message
39-
uses: actions/github-script@v6
39+
uses: actions/github-script@d556feaca394842dc55e4734bf3bb9f685482fa0 # v6.3.3
4040
if: steps.membercheck.outputs.result == 'false'
4141
with:
4242
github-token: ${{secrets.GITHUB_TOKEN}}

.github/workflows/lint.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ jobs:
2828
runs-on: ubuntu-22.04
2929
steps:
3030
- name: Checkout Repository
31-
uses: actions/checkout@v3
31+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
3232
- name: Setup Golang Environment
33-
uses: actions/setup-go@v3
33+
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
3434
with:
3535
go-version-file: go.mod
3636
cache: true
3737
- name: Lint Code
38-
uses: golangci/golangci-lint-action@v3
38+
uses: golangci/golangci-lint-action@07db5389c99593f11ad7b44463c2d4233066a9b1 # v3.3.0
3939
with:
4040
only-new-issues: true
4141

@@ -44,7 +44,7 @@ jobs:
4444
runs-on: ubuntu-22.04
4545
steps:
4646
- name: Checkout Repository
47-
uses: actions/checkout@v3
48-
- uses: reviewdog/action-actionlint@v1
47+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
48+
- uses: reviewdog/action-actionlint@5c714fa8ca7b5ea8d929d273ed5bb2e3a4a7c019 # v1.34.1
4949
with:
5050
actionlint_flags: -shellcheck ""

.github/workflows/notifications.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
if: ${{ github.event.workflow_run.conclusion == 'failure' && github.event.repository.fork == false }}
2020
steps:
2121
- name: Data
22-
uses: actions/github-script@v6
22+
uses: actions/github-script@d556feaca394842dc55e4734bf3bb9f685482fa0 # v6.3.3
2323
continue-on-error: true
2424
id: data
2525
with:
@@ -40,7 +40,7 @@ jobs:
4040
}
4141
4242
- name: Send Notification
43-
uses: 8398a7/action-slack@v3
43+
uses: 8398a7/action-slack@a189acbf0b7ea434558662ae25a0de71df69a435 # v3.14.0
4444
with:
4545
status: custom
4646
custom_payload: |

.github/workflows/release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ jobs:
2525
name: Create Draft Release
2626
runs-on: ubuntu-22.04
2727
steps:
28-
- uses: actions/setup-node@v3
28+
- uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1
2929
- run: npm install semver
30-
- uses: actions/github-script@v6
30+
- uses: actions/github-script@d556feaca394842dc55e4734bf3bb9f685482fa0 # v6.3.3
3131
continue-on-error: true
3232
with:
3333
script: |

.github/workflows/scorecards.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ jobs:
2525

2626
steps:
2727
- name: "Checkout code"
28-
uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # tag=v3.0.0
28+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
2929
with:
3030
persist-credentials: false
3131

3232
- name: "Run analysis"
33-
uses: ossf/scorecard-action@99c53751e09b9529366343771cc321ec74e9bd3d # tag=v2.0.5
33+
uses: ossf/scorecard-action@99c53751e09b9529366343771cc321ec74e9bd3d # v2.0.6
3434
with:
3535
results_file: results.sarif
3636
results_format: sarif
@@ -45,14 +45,14 @@ jobs:
4545
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
4646
# format to the repository Actions tab.
4747
- name: "Upload artifact"
48-
uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535 # tag=v3.0.0
48+
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3.1.1
4949
with:
5050
name: SARIF file
5151
path: results.sarif
5252
retention-days: 5
5353

5454
# Upload the results to GitHub's code scanning dashboard.
5555
- name: "Upload to code-scanning"
56-
uses: github/codeql-action/upload-sarif@5f532563584d71fdef14ee64d17bafb34f751ce5 # tag=v1.0.26
56+
uses: github/codeql-action/upload-sarif@678fc3afe258fb2e0cdc165ccf77b85719de7b3c # v2.1.33
5757
with:
5858
sarif_file: results.sarif

0 commit comments

Comments
 (0)