Skip to content

Commit

Permalink
feat(workflows): add cleanup job for old images versions
Browse files Browse the repository at this point in the history
  • Loading branch information
f-bn committed May 5, 2024
1 parent 46477d0 commit 602cb01
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/cleanup-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Cleanup old container images versions
on:
workflow_dispatch:
schedule:
- cron: '00 4 * * 6' # Every Saturday at 04:00am
jobs:
cleanup:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
package: ['adguard-home','ferretdb','navidrome','pgbouncer','postgresql','valkey','watchtower']
steps:
- uses: actions/delete-package-versions@v5
with:
owner: github
package-name: ${{ matrix.package }}
package-type: container
token: ${{ secrets.GITHUB_TOKEN }}
min-versions-to-keep: 5
delete-only-untagged-versions: true

0 comments on commit 602cb01

Please sign in to comment.