Skip to content

Commit

Permalink
try a different approach to base image check
Browse files Browse the repository at this point in the history
  • Loading branch information
aine-etke committed Sep 11, 2024
1 parent 8eb71b3 commit d651e15
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ jobs:
id: check
run: |
IMAGE_TAG="ghcr.io/${{ github.repository }}/base:${{ env.alpine }}-${{ env.ansible_core }}-${{ env.ansible }}"
if docker manifest inspect "$IMAGE_TAG" > /dev/null 2>&1; then echo "exists=true" >> $GITHUB_OUTPUT; else echo "exists=false" >> $GITHUB_OUTPUT; fi
if docker manifest inspect "$IMAGE_TAG" > /dev/null 2>&1; then echo "exists=yes" >> "$GITHUB_OUTPUT"; else echo "exists=no" >> "$GITHUB_OUTPUT"; fi
- name: Login to ghcr.io
if: ${{ steps.check.outputs.exists == 'false' }}
if: ${{ steps.check.outputs.exists == 'no' }}
uses: docker/login-action@v3
with:
registry: ghcr.io
Expand All @@ -39,7 +39,7 @@ jobs:
tags: |
type=raw,value=${{ env.alpine }}-${{ env.ansible_core }}-${{ env.ansible }},enable=${{ github.ref_name == 'fresh' }}
- name: Build and push
if: ${{ steps.check.outputs.exists == 'false' }}
if: ${{ steps.check.outputs.exists == 'no' }}
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
Expand Down

0 comments on commit d651e15

Please sign in to comment.