Skip to content

Commit a2fa53f

Browse files
committed
adding qemu to docker publish
1 parent 7a18efc commit a2fa53f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/docker-publish.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ jobs:
3838
with:
3939
cosign-release: 'v2.2.4'
4040

41+
# Setup QEMU for cross-platform builds
42+
- name: setup qemu
43+
uses: docker/setup-qemu-action@v3
44+
4145
# Set up BuildKit Docker container builder to be able to build
4246
# multi-platform images and export cache
4347
# https://github.com/docker/setup-buildx-action
@@ -59,6 +63,7 @@ jobs:
5963
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
6064
with:
6165
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
66+
context: git
6267

6368
# Build and push Docker image with Buildx
6469
# https://github.com/docker/build-push-action
@@ -69,7 +74,7 @@ jobs:
6974
context: .
7075
push: true
7176
platforms: linux/amd64,linux/arm64
72-
tags: ${{ steps.meta.outputs.tags }}
77+
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.event.inputs.vTag }}
7378
labels: ${{ steps.meta.outputs.labels }}
7479
cache-from: type=gha
7580
cache-to: type=gha,mode=max
@@ -82,7 +87,7 @@ jobs:
8287
- name: Sign the published Docker image
8388
env:
8489
# https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
85-
TAGS: ${{ steps.meta.outputs.tags }}
90+
TAGS: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.event.inputs.vTag }}
8691
DIGEST: ${{ steps.build-and-push.outputs.digest }}
8792
# This step uses the identity token to provision an ephemeral certificate
8893
# against the sigstore community Fulcio instance.

0 commit comments

Comments
 (0)