Garbage-collect old images #84
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Garbage-collect untagged images | |
on: | |
schedule: | |
- cron: '27 2 * * 0' | |
workflow_dispatch: | |
jobs: | |
gc_old_images: | |
name: Delete untagged images except for the most recent 10 | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
strategy: | |
matrix: | |
pkg: | |
- govuk-ruby-base | |
- govuk-ruby-builder | |
steps: | |
- uses: actions/delete-package-versions@v5 | |
with: | |
package-name: ${{ matrix.pkg }} | |
package-type: container | |
min-versions-to-keep: 10 | |
delete-only-untagged-versions: 'true' |