mirror of
https://github.com/Snigdha-OS/snigdhaos-docker.git
synced 2025-09-05 17:36:36 +02:00
🐛 fix: push tag has been changed
This commit is contained in:
4
.github/workflows/snigdhaos-docker.yml
vendored
4
.github/workflows/snigdhaos-docker.yml
vendored
@@ -52,9 +52,9 @@ jobs:
|
||||
cache-to: type=inline # Use inline caching
|
||||
cache-from: type=registry,ref=${{ secrets.DOCKERHUB_USERNAME }}/snigdhaos:latest # Use cached layers from Docker Hub
|
||||
|
||||
# Optionally, tag the build with a version from GitHub
|
||||
# Tag Docker image with version based on the latest Git tag
|
||||
- name: Tag Docker image with version
|
||||
run: |
|
||||
VERSION=$(git describe --tags --abbrev=0 || echo "latest")
|
||||
VERSION=$(git tag -l | tail -n 1 || echo "latest") # Get the latest tag or fallback to "latest"
|
||||
docker tag ${{ secrets.DOCKERHUB_USERNAME }}/snigdhaos:latest ${{ secrets.DOCKERHUB_USERNAME }}/snigdhaos:${VERSION}
|
||||
docker push ${{ secrets.DOCKERHUB_USERNAME }}/snigdhaos:${VERSION}
|
||||
|
Reference in New Issue
Block a user