From 17c5a2c6801eaac8ad7191f40894584f94c65f3e Mon Sep 17 00:00:00 2001 From: David Leifker Date: Tue, 21 Nov 2023 09:59:50 -0600 Subject: [PATCH] fix(gha): fix gha for single tag --- .github/actions/docker-custom-build-and-push/action.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/actions/docker-custom-build-and-push/action.yml b/.github/actions/docker-custom-build-and-push/action.yml index bd6bb842b1fb80..d235512c2bad55 100644 --- a/.github/actions/docker-custom-build-and-push/action.yml +++ b/.github/actions/docker-custom-build-and-push/action.yml @@ -70,11 +70,17 @@ runs: push: false cache-from: type=registry,ref=${{ steps.docker_meta.outputs.tags }} cache-to: type=inline + - name: Single Tag + if: ${{ inputs.publish != 'true' }} + shell: bash + run: | + echo "SINGLE_TAG=$(echo "${{ steps.docker_meta.outputs.tags }}" | sed -E 's/(.*)[ \n]+(.*)/\1/')" >> $GITHUB_OUTPUT + id: single_tag - name: Upload image locally for testing (if not publishing) uses: ishworkh/docker-image-artifact-upload@v1 if: ${{ inputs.publish != 'true' }} with: - image: ${{ steps.docker_meta.outputs.tags }} + image: ${{ steps.single_tag.outputs.SINGLE_TAG }} # Code for building multi-platform images and pushing to Docker Hub. - name: Set up QEMU