@@ -87,15 +87,15 @@ jobs:
87
87
token_format : access_token
88
88
workload_identity_provider : ${{ secrets.GCP_WORKLOAD_IDENTITY }}
89
89
service_account : ${{ secrets.GCP_SERVICE_ACCOUNT }}
90
- if : ${{ github.event_name != 'pull_request' && contains(inputs.image, 'plus') }}
90
+ if : ${{ github.event_name != 'pull_request' && ( contains(inputs.image, 'plus') || inputs.image == 'plus-waf ') }}
91
91
92
92
- name : Login to GAR
93
93
uses : docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
94
94
with :
95
95
registry : us-docker.pkg.dev
96
96
username : oauth2accesstoken
97
97
password : ${{ steps.auth.outputs.access_token }}
98
- if : ${{ github.event_name != 'pull_request' && contains(inputs.image, 'plus') }}
98
+ if : ${{ github.event_name != 'pull_request' && ( contains(inputs.image, 'plus') || inputs.image == 'plus-waf ') }}
99
99
100
100
- name : Docker meta
101
101
id : meta
@@ -106,7 +106,9 @@ jobs:
106
106
name=ghcr.io/${{ github.repository_owner }}/nginx-gateway-fabric,enable=${{ inputs.image == 'ngf' && github.event_name != 'pull_request' }}
107
107
name=ghcr.io/${{ github.repository_owner }}/nginx-gateway-fabric/nginx,enable=${{ inputs.image == 'nginx' && github.event_name != 'pull_request' }}
108
108
name=docker-mgmt.nginx.com/nginx-gateway-fabric/nginx-plus,enable=${{ inputs.image == 'plus' && github.event_name != 'pull_request' }}
109
+ name=docker-mgmt.nginx.com/nginx-gateway-fabric/nginx-plus-nap-waf,enable=${{ inputs.image == 'plus-waf' && github.event_name != 'pull_request' }}
109
110
name=us-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/nginx-gateway-fabric/nginx-plus,enable=${{ inputs.image == 'plus' && github.event_name != 'pull_request' }}
111
+ name=us-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/nginx-gateway-fabric/nginx-plus-nap-waf,enable=${{ inputs.image == 'plus-waf' && github.event_name != 'pull_request' }}
110
112
name=localhost:5000/nginx-gateway-fabric/${{ inputs.image }}
111
113
flavor : |
112
114
latest=${{ (inputs.tag != '' && 'true') || 'auto' }}
@@ -134,7 +136,7 @@ jobs:
134
136
- name : Build Docker Image
135
137
uses : docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
136
138
with :
137
- file : build/Dockerfile${{ inputs.image == 'nginx' && '.nginx' || '' }}${{ inputs.image == 'plus' && '.nginxplus' || '' }}
139
+ file : build/Dockerfile${{ inputs.image == 'nginx' && '.nginx' || '' }}${{ ( inputs.image == 'plus' || inputs.image == 'plus-waf') && '.nginxplus' || '' }}
138
140
context : " ."
139
141
target : ${{ inputs.image == 'ngf' && 'goreleaser' || '' }}
140
142
tags : ${{ steps.meta.outputs.tags }}
@@ -146,17 +148,20 @@ jobs:
146
148
cache-to : type=gha,scope=${{ inputs.image }},mode=max
147
149
pull : true
148
150
no-cache : ${{ github.event_name != 'pull_request' }}
149
- sbom : true
151
+ sbom : ${{ inputs.image != 'plus-waf' }}
150
152
provenance : mode=max
151
153
build-args : |
152
154
NJS_DIR=internal/controller/nginx/modules/src
153
155
NGINX_CONF_DIR=internal/controller/nginx/conf
154
156
BUILD_AGENT=gha
157
+ ${{ inputs.image == 'plus-waf' && 'ALPINE_VERSION=3.19' || '' }}
158
+ ${{ inputs.image == 'plus-waf' && 'INCLUDE_NAP_WAF=true' || '' }}
155
159
secrets : |
156
160
${{ contains(inputs.image, 'plus') && format('"nginx-repo.crt={0}"', secrets.NGINX_CRT) || '' }}
157
161
${{ contains(inputs.image, 'plus') && format('"nginx-repo.key={0}"', secrets.NGINX_KEY) || '' }}
158
162
159
163
- name : Inspect SBOM and output manifest
164
+ if : ${{ inputs.image != 'plus-waf' }}
160
165
run : |
161
166
docker buildx imagetools inspect localhost:5000/nginx-gateway-fabric/${{ inputs.image }}:${{ steps.meta.outputs.version }} --format '{{ json (index .SBOM "linux/amd64").SPDX }}' > sbom-${{ inputs.image }}.json
162
167
docker buildx imagetools inspect localhost:5000/nginx-gateway-fabric/${{ inputs.image }}:${{ steps.meta.outputs.version }} --raw
@@ -169,11 +174,12 @@ jobs:
169
174
only-fixed : true
170
175
add-cpes-if-none : true
171
176
fail-build : false
177
+ if : inputs.image != 'plus-waf'
172
178
173
179
- name : Upload scan result to GitHub Security tab
174
180
uses : github/codeql-action/upload-sarif@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0
175
181
continue-on-error : true
176
182
with :
177
183
sarif_file : ${{ steps.scan.outputs.sarif }}
178
184
category : build-${{ inputs.image }}
179
- if : always()
185
+ if : always() && inputs.image != 'plus-waf'
0 commit comments