36
36
go_path : ${{ steps.vars.outputs.go_path }}
37
37
steps :
38
38
- name : Checkout Repository
39
- uses : actions/checkout@v3
39
+ uses : actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
40
40
- name : Setup Golang Environment
41
- uses : actions/setup-go@v3
41
+ uses : actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
42
42
with :
43
43
go-version-file : go.mod
44
44
cache : true
@@ -56,16 +56,16 @@ jobs:
56
56
needs : vars
57
57
steps :
58
58
- name : Checkout Repository
59
- uses : actions/checkout@v3
59
+ uses : actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
60
60
- name : Setup Golang Environment
61
- uses : actions/setup-go@v3
61
+ uses : actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
62
62
with :
63
63
go-version-file : go.mod
64
64
cache : true
65
65
- name : Run Tests
66
66
run : make unit-test
67
67
- name : Upload Coverage Report
68
- uses : actions/upload-artifact@v3
68
+ uses : actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3.1.1
69
69
with :
70
70
name : cover-${{ github.run_id }}.html
71
71
path : ${{ github.workspace }}/cover.html
77
77
needs : vars
78
78
steps :
79
79
- name : Checkout Repository
80
- uses : actions/checkout@v3
80
+ uses : actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
81
81
- name : Setup Node.js Environment
82
- uses : actions/setup-node@v3
82
+ uses : actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1
83
83
with :
84
84
node-version : 18
85
85
- run : npm --prefix ${{ github.workspace }}/internal/nginx/modules install
@@ -91,17 +91,17 @@ jobs:
91
91
needs : vars
92
92
steps :
93
93
- name : Checkout Repository
94
- uses : actions/checkout@v3
94
+ uses : actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
95
95
with :
96
96
fetch-depth : 0
97
97
- name : Setup Golang Environment
98
- uses : actions/setup-go@v3
98
+ uses : actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
99
99
with :
100
100
go-version-file : go.mod
101
101
cache : true
102
102
103
103
- name : Publish release on tag
104
- uses : actions/github-script@v6
104
+ uses : actions/github-script@d556feaca394842dc55e4734bf3bb9f685482fa0 # v6.3.3
105
105
continue-on-error : true
106
106
with :
107
107
github-token : ${{secrets.GITHUB_TOKEN}}
@@ -127,11 +127,11 @@ jobs:
127
127
if : startsWith(github.ref, 'refs/tags/')
128
128
129
129
- name : Download Syft
130
- uses : anchore/sbom-action/download-syft@v0.13.1
130
+ uses : anchore/sbom-action/download-syft@06e109483e6aa305a2b2395eabae554e51530e1d # v0.13.1
131
131
if : startsWith(github.ref, 'refs/tags/')
132
132
133
133
- name : Build binary
134
- uses : goreleaser/goreleaser-action@v3
134
+ uses : goreleaser/goreleaser-action@b508e2e3ef3b19d4e4146d4f8fb3ba9db644a757 # v3.2.0
135
135
with :
136
136
version : latest
137
137
args : ${{ startsWith(github.ref, 'refs/tags/') && 'release' || 'build --snapshot' }} --rm-dist
@@ -143,7 +143,7 @@ jobs:
143
143
AZURE_BUCKET_NAME : ${{ secrets.AZURE_BUCKET_NAME }}
144
144
145
145
- name : Cache Artifacts
146
- uses : actions/cache@v3
146
+ uses : actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # v3.0.11
147
147
with :
148
148
path : ${{ github.workspace }}/dist
149
149
key : nginx-kubernetes-gateway-${{ github.run_id }}-${{ github.run_number }}
@@ -154,28 +154,28 @@ jobs:
154
154
needs : [vars, binary]
155
155
steps :
156
156
- name : Checkout Repository
157
- uses : actions/checkout@v3
157
+ uses : actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
158
158
- name : Fetch Cached Artifacts
159
- uses : actions/cache@v3
159
+ uses : actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # v3.0.11
160
160
with :
161
161
path : ${{ github.workspace }}/dist
162
162
key : nginx-kubernetes-gateway-${{ github.run_id }}-${{ github.run_number }}
163
163
- name : Docker Buildx
164
- uses : docker/setup-buildx-action@v2
164
+ uses : docker/setup-buildx-action@8c0edbc76e98fa90f69d9a2c020dcb50019dc325 # v2.2.1
165
165
- name : Setup QEMU
166
- uses : docker/setup-qemu-action@v2
166
+ uses : docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v2.1.0
167
167
with :
168
168
platforms : arm64
169
169
- name : Login to GitHub Container Registry
170
- uses : docker/login-action@v2
170
+ uses : docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0
171
171
if : ${{ github.event_name != 'pull_request' }}
172
172
with :
173
173
registry : ghcr.io
174
174
username : ${{ github.repository_owner }}
175
175
password : ${{ secrets.GITHUB_TOKEN }}
176
176
- name : Docker meta
177
177
id : meta
178
- uses : docker/metadata-action@v4
178
+ uses : docker/metadata-action@57396166ad8aefe6098280995947635806a0e6ea # v4.1.1
179
179
with :
180
180
images : |
181
181
name=ghcr.io/nginxinc/nginx-kubernetes-gateway
@@ -186,7 +186,7 @@ jobs:
186
186
type=ref,event=branch,suffix=-rc,enable=${{ startsWith(github.ref, 'refs/heads/release') }}
187
187
188
188
- name : Build Docker Image
189
- uses : docker/build-push-action@v3
189
+ uses : docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5 # v3.2.0
190
190
with :
191
191
file : build/Dockerfile
192
192
context : ' .'
@@ -202,20 +202,20 @@ jobs:
202
202
no-cache : ${{ github.event_name != 'pull_request' }}
203
203
204
204
- name : Run Trivy vulnerability scanner
205
- uses : aquasecurity/trivy-action@0.8.0
205
+ uses : aquasecurity/trivy-action@9ab158e8597f3b310480b9a69402b419bc03dbd5 # 0.8.0
206
206
continue-on-error : true
207
207
with :
208
208
image-ref : ghcr.io/nginxinc/nginx-kubernetes-gateway:${{ steps.meta.outputs.version }}
209
209
format : ' sarif'
210
210
output : ' trivy-results-nginx-kubernetes-gateway.sarif'
211
211
ignore-unfixed : ' true'
212
212
- name : Upload Trivy scan results to GitHub Security tab
213
- uses : github/codeql-action/upload-sarif@v2
213
+ uses : github/codeql-action/upload-sarif@678fc3afe258fb2e0cdc165ccf77b85719de7b3c # v2.1.33
214
214
continue-on-error : true
215
215
with :
216
216
sarif_file : ' trivy-results-nginx-kubernetes-gateway.sarif'
217
217
- name : Upload Scan Results
218
- uses : actions/upload-artifact@v3
218
+ uses : actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3.1.1
219
219
continue-on-error : true
220
220
with :
221
221
name : ' trivy-results-nginx-kubernetes-gateway.sarif'
0 commit comments