diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 59c321e..1f94ad2 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -15,6 +15,9 @@ jobs: steps: - uses: actions/checkout@v3 - name: Build the Docker image - run: docker build . --file Dockerfile --tag shivamgutgutia/vcfgenerator:$(date +%s) + run: | + IMAGE_TAG=$(git rev-parse --short HEAD) # Get the short commit SHA + docker build . --file Dockerfile --tag shivamgutgutia/vcfgenerator:$IMAGE_TAG + - name: Push Docker image to Docker Hub - run: docker push shivamgutgutia/vcfgenerator:$(date +%s) + run: docker push shivamgutgutia/vcfgenerator:$IMAGE_TAG