Skip to content

Commit

Permalink
ci: add deletion of untagged images
Browse files Browse the repository at this point in the history
  • Loading branch information
eliasmueller committed Oct 7, 2024
1 parent c7399d2 commit 1d1280f
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 @@ -31,3 +31,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 1d1280f

Please sign in to comment.