Skip to content

Commit

Permalink
ci: add deletion of untagged images (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
eliasmueller authored Oct 7, 2024
1 parent e9b0794 commit 8d0186b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/buildAndPushImage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,18 @@ jobs:

- name: Push the Docker image
run: docker push $IMAGE_URL/$IMAGE_NAME:$IMAGE_TAG

delete-untagged-images:
needs:
- build-using-dockerfile-push-2-ghcr
runs-on: ubuntu-latest
steps:
- uses: actions/delete-package-versions@v5
with:
owner: ${{ github.repository_owner }}
package-name: ${{ env.IMAGE_NAME }}
package-type: "container"
token: ${{ secrets.GITHUB_TOKEN }}
min-versions-to-keep: 3
delete-only-pre-release-versions: "true"
delete-only-untagged-versions: "true"

0 comments on commit 8d0186b

Please sign in to comment.