ci: add workflow for cleaning up GHCR images #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces automated cleanup processes for Docker images, both locally and in the GitHub Container Registry (GHCR), to help manage disk usage and keep only the most recent images. It adds scripts for local and remote cleanup, a new GitHub Actions workflow for GHCR cleanup, and updates the documentation to explain these maintenance tools.
scripts/cleanup-local-docker-images.sh, a script to clean up old local Docker images, keeping only the latest base and runtime images. Supports dry-run and force options for safety.scripts/cleanup-ghcr-images.sh, a script for removing older images from GHCR using the GitHub CLI, with options for dry-run, force, and controlling the number of versions to keep..github/workflows/cleanup-ghcr.yml, a GitHub Actions workflow to automate GHCR image cleanup, supporting manual triggers and configurable options for safe deletion.CONTRIBUTING.mdwith a new section on Docker image maintenance, detailing how to use the cleanup scripts and workflow, their options, and the retention policy for images.