From a946f6ee3fc73f0183990bcd945be4398479c77e Mon Sep 17 00:00:00 2001 From: eshanized Date: Thu, 2 Jan 2025 04:25:23 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20verification=20existence?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/snigdhaos-docker.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/snigdhaos-docker.yml b/.github/workflows/snigdhaos-docker.yml index e0ddd3f..c98dde5 100644 --- a/.github/workflows/snigdhaos-docker.yml +++ b/.github/workflows/snigdhaos-docker.yml @@ -42,7 +42,7 @@ jobs: ${{ runner.os }}-buildx- # Build and push Docker image (only for amd64 platform now) - - name: Build and push Docker image + - name: Build Docker image id: build uses: docker/build-push-action@v4 with: @@ -53,6 +53,12 @@ jobs: cache-to: type=inline # Use inline caching cache-from: type=registry,ref=${{ secrets.DOCKERHUB_USERNAME }}/snigdhaos:latest # Use cached layers from Docker Hub + # Add a check to confirm that the image was built and tagged correctly + - name: Verify Docker image exists + run: | + echo "Checking if snigdhaos:latest image exists" + docker images -q snigdhaos:latest || echo "Image not found" + # Check if build succeeded and tag Docker image with version based on the latest Git tag - name: Tag Docker image with version if: success() # Only proceed if the build was successful @@ -72,4 +78,3 @@ jobs: else echo "Docker image not found, skipping tag and push." exit 1 # Fail the step if the image does not exist - fi