https://github.com/ddterm/ghcr-cleanup
https://github.com/ddterm/ghcr-cleanup
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ddterm/ghcr-cleanup
- Owner: ddterm
- Created: 2023-11-04T08:27:52.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-06-30T05:30:26.000Z (12 months ago)
- Last Synced: 2025-06-30T06:31:43.206Z (12 months ago)
- Language: JavaScript
- Homepage:
- Size: 88.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Docker registry cleanup
-----------------------
For every repository:
1. Images updated less than 1 day ago are kept
2. Images updated more than 1 year ago are deleted
3. Images with `org.opencontainers.image.version` label matching existing
tags/branches or open pull requests are kept
4. Everything else is deleted
## REST API pagination race condition
It seems that GitHub API pagination can "skip" a branch/tag/pull request
if another branch/tag/PR is deleted concurrently.
However, we mostly care about tags. Images for branches and pull requests
are not as precious and can be rebuilt if necessary.
Tags should never be deleted - so this isn't a real issue.