Skip to content

Commit

Permalink
Auto prune old containers
Browse files Browse the repository at this point in the history
  • Loading branch information
dometto committed Nov 1, 2023
1 parent addd147 commit 7c3c9dd
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/prune.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

on:
schedule:
- cron: '22 0 * * *' # 22 past midnight daily
workflow_dispatch:

jobs:
prune_images:
runs-on: ubuntu-latest
steps:
# https://github.com/actions/delete-package-versions#delete-all-untagged-container-versions-except-y-latest-untagged-versions
- name: Prune untagged images from ghcr
uses: actions/delete-package-versions@v4
with:
package-name: 'utrechtuniversity/src-test-workspace'
package-type: 'container'
min-versions-to-keep: 5 # ...but keep the latest n untagged images
delete-only-untagged-versions: 'true'

0 comments on commit 7c3c9dd

Please sign in to comment.