39
39
strategy :
40
40
matrix :
41
41
k8s-version : ["latest"]
42
- nginx-image : [nginx-plus]
42
+ nginx-image : [nginx, nginx -plus]
43
43
steps :
44
44
- name : Checkout Repository
45
45
uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
@@ -118,24 +118,18 @@ jobs:
118
118
cache-from : type=gha
119
119
cache-to : type=gha,mode=max
120
120
pull : true
121
+ target : goreleaser
121
122
122
123
- name : Build NGINX Docker Image
123
- id : docker-nginx
124
124
uses : docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0
125
125
with :
126
- file : build/Dockerfile${{ inputs.image == 'nginx' && '.nginx' || '' }}${{ inputs.image == 'plus' && '.nginxplus' || '' }}
127
- context : " ."
128
- target : ${{ inputs.image == 'ngf' && 'goreleaser' || '' }}
126
+ file : build/Dockerfile${{ matrix.nginx-image == 'nginx' && '.nginx' || '' }}${{ matrix.nginx-image == 'nginx-plus' && '.nginxplus' || ''}}
129
127
tags : ${{ steps.nginx-meta.outputs.tags }}
130
- labels : ${{ steps.nginx-meta.outputs.labels }}
131
- annotations : ${{ steps.nginx-meta.outputs.annotations }}
132
- push : false
133
- platforms : ${{ inputs.platforms }}
134
- cache-from : type=gha
135
- cache-to : type=gha,mode=max
128
+ context : " ."
136
129
load : true
137
- pull : false
138
- no-cache : ${{ github.event_name != 'pull_request' }}
130
+ cache-from : type=gha,scope=${{ matrix.nginx-image }}
131
+ cache-to : type=gha,scope=${{ matrix.nginx-image }},mode=max
132
+ pull : true
139
133
build-args : |
140
134
NJS_DIR=internal/mode/static/nginx/modules/src
141
135
NGINX_CONF_DIR=internal/mode/static/nginx/conf
@@ -151,6 +145,13 @@ jobs:
151
145
make create-kind-cluster KIND_KUBE_CONFIG=${kube_config}
152
146
echo "KUBECONFIG=${kube_config}" >> "$GITHUB_ENV"
153
147
148
+ - name : Wait for release to exist
149
+ if : startsWith(github.ref, 'refs/tags/')
150
+ run : |
151
+ REF=${{ github.ref_name }}
152
+ until docker pull ghcr.io/nginxinc/nginx-gateway-fabric:${REF#v}; do sleep 5; done
153
+ until docker pull ghcr.io/nginxinc/nginx-gateway-fabric/nginx:${REF#v}; do sleep 5; done
154
+
154
155
- name : Setup functional tests
155
156
id : setup
156
157
run : |
@@ -160,7 +161,7 @@ jobs:
160
161
make load-images${{ matrix.nginx-image == 'nginx-plus' && '-with-plus' || ''}} PREFIX=${ngf_prefix} TAG=${ngf_tag}
161
162
working-directory : ./tests
162
163
163
- - name : Run NGINX functional tests
164
+ - name : Run functional tests
164
165
run : |
165
166
ngf_prefix=ghcr.io/nginxinc/nginx-gateway-fabric
166
167
ngf_tag=${{ steps.ngf-meta.outputs.version }}
0 commit comments