From 7b0e2aecf09e9127fcdd13bf739a2ffdd9a3fe71 Mon Sep 17 00:00:00 2001 From: Thord Setsaas Date: Sat, 4 Dec 2021 16:48:28 +0100 Subject: [PATCH] Fixed tagging of release version --- .github/workflows/docker.image.yaml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker.image.yaml b/.github/workflows/docker.image.yaml index d87daaa2..6fc2b01d 100644 --- a/.github/workflows/docker.image.yaml +++ b/.github/workflows/docker.image.yaml @@ -23,10 +23,9 @@ jobs: platforms: arm,arm64,amd64 - name: Docker Setup Buildx uses: docker/setup-buildx-action@v1.6.0 - - name: Build & Push Docker image + - name: Build & Push Docker image (Latest) + if: github.event_name == 'push' && startsWith(github.ref, 'refs/remotes/') run: docker buildx build . --file Dockerfile -t kcapp/frontend:latest --platform=linux/arm,linux/arm64,linux/amd64 --push - - name: Tag release version + - name: Build & Push Docker image (Release version) if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') - run: | - docker tag kcapp/frontend:latest kcapp/frontend:${{ env.RELEASE_VERSION }} - docker push kcapp/frontend:${{ env.RELEASE_VERSION }} + run: docker buildx build . --file Dockerfile -t kcapp/frontend:${{ env.RELEASE_VERSION }} --platform=linux/arm,linux/arm64,linux/amd64 --push