diff --git a/.github/workflows/cleanup-images.yml b/.github/workflows/cleanup-images.yml new file mode 100644 index 0000000..89fb99c --- /dev/null +++ b/.github/workflows/cleanup-images.yml @@ -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 \ No newline at end of file