Skip to content

Commit

Permalink
ci: delete old container images
Browse files Browse the repository at this point in the history
This action "correctly" deletes old (untagged) container images and the
corresponding attestations. It also handles the multi-arch images
correctly.

Signed-off-by: Felix Moessbauer <[email protected]>
Signed-off-by: Jan Kiszka <[email protected]>
  • Loading branch information
fmoessbauer authored and jan-kiszka committed Jul 19, 2024
1 parent 5df6e79 commit 48f563d
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,20 @@ jobs:
subject-name: ghcr.io/${{ github.repository }}/${{ matrix.image-name }}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true

cleanup_ghcr_containers:
name: cleanup untagged ${{ matrix.image-name }} containers
runs-on: ubuntu-latest
needs: build_containers
permissions:
packages: write
strategy:
matrix:
image-name: ["kas", "kas-isar"]
steps:
- uses: dataaxiom/[email protected]
with:
dry-run: false
validate: true
package: kas/${{ matrix.image-name }}
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 48f563d

Please sign in to comment.