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 <felix.moessbauer@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
  • Loading branch information
fmoessbauer authored and jan-kiszka committed Sep 6, 2024
1 parent 2a3fc21 commit 17283de
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/ghcr-cleanup-action@0fd10e8918e3994b92c417a43fb6e33bc6188c9e #v1.0.10
with:
dry-run: false
validate: true
package: kas/${{ matrix.image-name }}
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 17283de

Please # to comment.