Skip to content

Commit 8ef4adb

Browse files
committed
Move image save and upload to build.yaml. Add debug echo for tags
1 parent afc676e commit 8ef4adb

File tree

2 files changed

+19
-11
lines changed

2 files changed

+19
-11
lines changed

.github/workflows/build.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,11 +193,27 @@ jobs:
193193
with:
194194
sarif_file: ${{ steps.scan.outputs.sarif }}
195195
category: build-${{ inputs.image }}
196+
197+
- name: Save NGINX Gateway Fabric image
198+
if: ${{ inputs.image == 'ngf' }}
199+
run: |
200+
IMAGE_TAG=$(echo "${{ steps.meta.outputs.tags }}" | grep '^localhost:5000/nginx-gateway-fabric/ngf:' | head -n 1)
201+
docker save -o ngf-image.tar $IMAGE_TAG
202+
203+
- name: Upload NGINX Gateway Fabric image artifact
204+
uses: actions/upload-artifact@v4
205+
with:
206+
name: ngf-image
207+
path: ngf-image.tar
208+
209+
- name: Show all image tags for debugging
210+
run: echo "${{ steps.meta.outputs.tags }}"
196211

197212
- name: Save NGINX OSS image as tarball
198213
if: ${{ inputs.image == 'nginx' }}
199214
run: |
200-
docker save -o nginx-oss-image.tar localhost:5000/nginx-gateway-fabric/nginx:${{ github.run_id }}-${{ github.run_number }}
215+
IMAGE_TAG=$(echo "${{ steps.meta.outputs.tags }}" | grep '^localhost:5000/nginx-gateway-fabric/nginx:' | head -n 1)
216+
docker save -o nginx-oss-image.tar $IMAGE_TAG
201217
202218
- name: Upload NGINX OSS image artifact
203219
if: ${{ inputs.image == 'nginx' }}
@@ -209,7 +225,8 @@ jobs:
209225
- name: Save Operator image as tarball
210226
if: ${{ inputs.image == 'operator' }}
211227
run: |
212-
docker save -o operator-image.tar localhost:5000/nginx-gateway-fabric/operator:${{ github.run_id }}-${{ github.run_number }}
228+
IMAGE_TAG=$(echo "${{ steps.meta.outputs.tags }}" | grep '^localhost:5000/nginx-gateway-fabric/operator:' | head -n 1)
229+
docker save -o operator-image.tar $IMAGE_TAG
213230
214231
- name: Upload Operator image artifact
215232
if: ${{ inputs.image == 'operator' }}

.github/workflows/ci.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -271,15 +271,6 @@ jobs:
271271
path: ${{ github.workspace }}/dist
272272
key: nginx-gateway-fabric-${{ github.run_id }}-${{ github.run_number }}
273273

274-
- name: Save NGINX Gateway Fabric image
275-
run: docker save -o ngf-image.tar localhost:5000/nginx/nginx-gateway-fabric:${{ github.run_id }}-${{ github.run_number }}
276-
277-
- name: Upload NGINX Gateway Fabric image artifact
278-
uses: actions/upload-artifact@v4
279-
with:
280-
name: ngf-image
281-
path: ngf-image.tar
282-
283274
assertion:
284275
name: Generate and Sign Assertion Documents
285276
needs: [vars, binary]

0 commit comments

Comments
 (0)