🐛 fix: simplified docker tag

This commit is contained in:
eshanized
2025-01-02 04:22:25 +05:30
parent 0cbf9e2321
commit a5e731c033

View File

@@ -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}