diff --git a/.github/workflows/docker-build-if-runner.yml b/.github/workflows/docker-build-if-runner.yml index 1a8009b9..26c08e5a 100644 --- a/.github/workflows/docker-build-if-runner.yml +++ b/.github/workflows/docker-build-if-runner.yml @@ -37,11 +37,12 @@ jobs: - name: Build Docker Image run: docker build -t $REGISTRY/$IMAGE_NAME:$IMAGE_TAG $IMAGE_FOLDER - - name: Tag Docker Image as ubuntu - if: github.ref == 'refs/heads/main' - run: docker tag $REGISTRY/$IMAGE_NAME:$IMAGE_TAG $REGISTRY/$IMAGE_NAME:latest - - name: Push Docker image run: | docker push $REGISTRY/$IMAGE_NAME:$IMAGE_TAG + + - name: Tag and push Docker image as latest + if: github.ref == 'refs/heads/main' + run: | + docker tag $REGISTRY/$IMAGE_NAME:$IMAGE_TAG $REGISTRY/$IMAGE_NAME:latest docker push $REGISTRY/$IMAGE_NAME:latest