From f7dd0cb4d9fa7c0469b0d5ae487f6d1a51649885 Mon Sep 17 00:00:00 2001 From: Shivam Gutgutia <100862487+shivamgutgutia@users.noreply.github.com> Date: Fri, 1 Dec 2023 14:51:11 +0530 Subject: [PATCH] Update docker-image.yml --- .github/workflows/docker-image.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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