From a5e731c033097422e759589ea9b29bb0aa42f09e Mon Sep 17 00:00:00 2001 From: eshanized Date: Thu, 2 Jan 2025 04:22:25 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20simplified=20docker=20tag?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/snigdhaos-docker.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/snigdhaos-docker.yml b/.github/workflows/snigdhaos-docker.yml index d4992b5..222e48b 100644 --- a/.github/workflows/snigdhaos-docker.yml +++ b/.github/workflows/snigdhaos-docker.yml @@ -56,5 +56,12 @@ jobs: - name: Tag Docker image with version run: | VERSION=$(git tag -l | tail -n 1 || echo "latest") # Get the latest tag or fallback to "latest" + + # Ensure VERSION is not empty, default to "latest" if it's empty + if [ -z "$VERSION" ]; then + VERSION="latest" + fi + + # Tag and push the image docker tag ${{ secrets.DOCKERHUB_USERNAME }}/snigdhaos:latest ${{ secrets.DOCKERHUB_USERNAME }}/snigdhaos:${VERSION} docker push ${{ secrets.DOCKERHUB_USERNAME }}/snigdhaos:${VERSION}