From 03edf8a82e8118229926d2b2aa0e2dbd33c99b0a Mon Sep 17 00:00:00 2001 From: Oscar Eriksson Date: Tue, 5 Nov 2024 18:31:43 +0100 Subject: [PATCH] Rework push logic --- .github/workflows/build-and-publish-image.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-and-publish-image.yml b/.github/workflows/build-and-publish-image.yml index cd69f0658..367d5c9bb 100644 --- a/.github/workflows/build-and-publish-image.yml +++ b/.github/workflows/build-and-publish-image.yml @@ -51,7 +51,9 @@ jobs: - name: Build Docker image run: ./gradlew bootBuildImage - - name: Create manifest list and push + - name: Push docker image run: | - docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ - app:latest + for tag in $(jq -r '.tags | join(" ")' <<< "${{ steps.meta.outputs.metadata }}"); do + docker image tag app:latest $tag + done + docker image push --all-tags ghcr.io/${{ github.repository_owner }}/gamma