Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Implement cleanup action in dry-run mode #262

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/registryCleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Delete old container images

on:
workflow_dispatch:
# schedule:
# - cron: "0 0 * * *" # every day at midnight
pull_request:
branches: [ dev ]

jobs:
delete-package-versions:
name: Delete package versions older than 6 weeks, but keep 10 versioned in case of rollbacks
runs-on: ubuntu-latest
steps:
- uses: snok/[email protected]
with:
account: ${{ github.repository_owner }}
token: ${{ secrets.GITHUB_TOKEN }}
image-names: "fhem-docker fhem-minimal-docker" # select three packages
image-tags: "dev !latest pr*" # any image tag
tag-selection: both # select both tagged and untagged package versions
cut-off: 6w # package versions should be older than 4 weeks
keep-n-most-recent: 10 # keep up to `n` tagged package versions for each of the packages

Loading