From e2a6b19a2e85ceca95ba3a9cdb1e7ad5481ba80c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Guy=20S=C3=BC=C3=9F?= Date: Tue, 15 Jul 2025 10:21:03 +1000 Subject: [PATCH] fix: two tag extensions Run docker build -t ghcr.io/ghcr.io/jgsuess/fhirflare-ig-toolkit:main:latest . ERROR: failed to build: invalid tag "ghcr.io/ghcr.io/jgsuess/fhirflare-ig-toolkit:main:latest": invalid reference format --- .github/workflows/docker-publish.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 3097268..9497bcc 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -38,12 +38,16 @@ jobs: - name: Set normalized image name run: | - echo "IMAGE_NAME=${{ steps.meta.outputs.tags }}" >> $GITHUB_ENV + if [[ "${{ github.ref_name }}" == "main" ]]; then + echo "IMAGE_NAME=$(echo ${{ steps.meta.outputs.tags }} | sed 's/:main/:latest/')" >> $GITHUB_ENV + else + echo "IMAGE_NAME=${{ steps.meta.outputs.tags }}" >> $GITHUB_ENV + fi - name: Build Docker image run: | - docker build -t ghcr.io/${{ env.IMAGE_NAME }}:latest . + docker build -t ${{ env.IMAGE_NAME }} . - name: Push Docker image run: | - docker push ghcr.io/${{ env.IMAGE_NAME }}:latest \ No newline at end of file + docker push ${{ env.IMAGE_NAME }} \ No newline at end of file