Skip to content

Commit

Permalink
Only purge when something new gets pushed
Browse files Browse the repository at this point in the history
  • Loading branch information
wkornewald committed Nov 13, 2023
1 parent 1aced52 commit c45eade
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
fi
- name: Build and push
uses: docker/build-push-action@v5
if: github.event_name == 'workflow_dispatch' || github.event_name != 'pull_request' && steps.checkchanged.outputs.CHANGED != 'false'
if: github.event_name == 'workflow_dispatch' || (github.event_name != 'pull_request' && steps.checkchanged.outputs.CHANGED != 'false')
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7
Expand All @@ -72,6 +72,7 @@ jobs:
ghcr.io/${{ github.repository }}:1
- name: Purge old images
uses: actions/delete-package-versions@v4
if: github.event_name == 'workflow_dispatch' || (github.event_name != 'pull_request' && steps.checkchanged.outputs.CHANGED != 'false')
with:
package-name: ${{ github.event.repository.name }}
package-type: 'container'
Expand Down

0 comments on commit c45eade

Please sign in to comment.