Skip to content

Commit

Permalink
Fix check for existing image
Browse files Browse the repository at this point in the history
RISDEV-0000
  • Loading branch information
malte-laukoetter committed Jul 11, 2024
1 parent cfc24aa commit 70bade2
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/manual-branch-deploy-to-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,13 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Check if image with commit sha already exists
run:
docker manifest inspect ghcr.io/${{ github.repository }}:${{ github.sha }} > /dev/null
test $? -eq 0 && echo "image-exists=true" >> "$GITHUB_OUTPUT" || echo "image-exists=false" >> "$GITHUB_OUTPUT"
run: docker manifest inspect ghcr.io/${{ github.repository }}:${{ github.sha }}
- name: Set output if image exists
if: ${{ success() }}
run: echo "image-exists=true" >> "$GITHUB_OUTPUT"
- name: Set output if image does not exist
if: ${{ failure() }}
run: echo "image-exists=false" >> "$GITHUB_OUTPUT"

create-docker-image-job:
needs:
Expand Down

0 comments on commit 70bade2

Please sign in to comment.