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 Request] Keep last n tagged images with a specific tagname #18

Closed
Erates opened this issue May 28, 2024 · 4 comments
Closed

[Feature Request] Keep last n tagged images with a specific tagname #18

Erates opened this issue May 28, 2024 · 4 comments

Comments

@Erates
Copy link
Contributor

Erates commented May 28, 2024

It would be a nice feature where we can configure the action in such a way, that it deletes all tags according to the tag wildcard and are older than x amount of days.

@rohanmars
Copy link
Contributor

Agreed. Now that some CI tests are in place I was planning to add a by date option. It definitely makes sense on the --tags mode. Are you wanting it on the --keep-n-tagged option also?

@rohanmars
Copy link
Contributor

I've been thinking of using these additional scope filters and options:

     delete-untagged - default 
     delete-tags/tags
     keep-n-tagged
     keep-n-untagged
     exclude-tags
     
     # scope filters
     and-older-than
     and-downloads-less-than (default 5000 for public repo)
     and-contains-labels (docker image labels - need to figure out syntax for matching
     
     # additional actions
     delete-partial-manifests (default false)
     delete-ghost-manfests (default true)
     delete-ghost-referrers-tags (default true)

@rohanmars
Copy link
Contributor

I've implemented a older-than option in 2b3cd04, it takes precedent and can be applied to all the delete and keep options. It effectively only include in scope those images that are "older than" that value.

@rohanmars
Copy link
Contributor

I've released v1.0.8/v1 ff99a6e with this feature, so closing this issue.

Thanks for your feedback/suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants