Skip to content

Commit ce3f4c6

Browse files
committed
Use docker save instead of buildx
1 parent fd02d12 commit ce3f4c6

File tree

2 files changed

+5
-31
lines changed

2 files changed

+5
-31
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -66,18 +66,7 @@ jobs:
6666
- name: Docker Buildx
6767
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
6868
with:
69-
install: true
70-
version: latest
7169
driver-opts: network=host
72-
73-
- name: Show Buildx version
74-
run: docker buildx version
75-
76-
- name: Show Buildx help
77-
run: docker buildx --help
78-
79-
- name: Show Buildx export help
80-
run: docker buildx imagetools export --help
8170

8271
- name: Setup QEMU
8372
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
@@ -213,17 +202,11 @@ jobs:
213202
- name: Show all image tags for debugging
214203
run: echo "${{ steps.meta.outputs.tags }}"
215204

216-
- name: Login to GitHub Container Registry
217-
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
218-
with:
219-
registry: ghcr.io
220-
username: ${{ github.repository_owner }}
221-
password: ${{ secrets.GITHUB_TOKEN }}
222-
223-
- name: Export and upload images
205+
- name: Pull and save image artifact for linux/amd64
224206
if: ${{ inputs.build-os == 'ubi' && !inputs.dry_run }}
225207
run: |
226-
docker buildx imagetools export localhost:5000/nginx-gateway-fabric/${{ inputs.image }}:${{ steps.meta.outputs.version }} > ${{ inputs.image }}-${{ steps.meta.outputs.version }}.tar
208+
docker pull --platform=linux/amd64 localhost:5000/nginx-gateway-fabric/${{ inputs.image }}:${{ steps.meta.outputs.version }}
209+
docker save localhost:5000/nginx-gateway-fabric/${{ inputs.image }}:${{ steps.meta.outputs.version }} -o ${{ inputs.image }}-${{ steps.meta.outputs.version }}.tar
227210
228211
- name: Upload all image artifacts
229212
uses: actions/upload-artifact@v4

.github/workflows/openshift-certification.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- name: Download image artifact
3838
uses: actions/download-artifact@v4
3939
with:
40-
name: ${{ inputs.image }}-images
40+
name: ${{ inputs.image }}-${{ inputs.image_version }}
4141

4242
- name: Load image into Docker
4343
run: |
@@ -62,13 +62,4 @@ jobs:
6262
echo "Results for preflight-result.json:"
6363
jq '.results.failed' preflight-result.json
6464
exit 1
65-
fi
66-
67-
# cleanup:
68-
# runs-on: ubuntu-24.04
69-
# if: always()
70-
# steps:
71-
# - name: Delete image from registry
72-
# run: |
73-
# curl -X DELETE "https://ghcr.io/v2/${{ github.repository_owner }}/nginx-gateway-fabric/${{ inputs.image }}:${{ inputs.image_version }}" \
74-
# -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}"
65+
fi

0 commit comments

Comments
 (0)