Skip to content

Commit

Permalink
fails release if image exists
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver-z-luo committed Nov 26, 2023
1 parent d3d5879 commit a7b9a05
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,14 @@ jobs:
echo "Image not found in ICR: ${IMAGE}"
fi
- name: Skip build and push?
run: echo "Image is found on ICR, skipping build and push"
if: env.IMAGE_EXISTS=='true'
- name: Fail if image already exists
run: |
if [ "$IMAGE_EXISTS" == "true" ]; then
echo "Image already exists. Failing the release."
exit 1
fi
env:
IMAGE_EXISTS: ${{ env.IMAGE_EXISTS }}

- name: Build and push
id: build-push
Expand Down

0 comments on commit a7b9a05

Please sign in to comment.