feat: implement better clean up strategy#926
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR implements a better cleanup strategy for container images by replacing the existing bots-house/ghcr-delete-image-action with dataaxiom/ghcr-cleanup-action and adding a new scheduled workflow for general image cleanup.
- Replaces the custom login and deletion logic with a more specialized GitHub Container Registry cleanup action
- Removes the matrix strategy for handling multiple flavors, consolidating cleanup into a single step
- Adds a new scheduled workflow that runs daily to clean up orphaned images with dry-run enabled
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
.github/workflows/pr-image-cleanup.yml |
Simplifies PR-specific image cleanup by replacing multiple actions with a single specialized cleanup action |
.github/workflows/image-cleanup.yml |
Adds new scheduled workflow for general image cleanup with orphaned image detection |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
.github/workflows/image-cleanup.yml
Outdated
| delete-images: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| packages: write |
Check warning
Code scanning / zizmor
permissions without explanatory comments Warning
📦 Container Size AnalysisComparing 📈 Size Comparison Table
|
📦 Container Size AnalysisComparing 📈 Size Comparison Table
|
🦙 MegaLinter status:
|
| Descriptor | Linter | Files | Fixed | Errors | Warnings | Elapsed time |
|---|---|---|---|---|---|---|
| ✅ ACTION | actionlint | 19 | 0 | 0 | 0.51s | |
| ✅ DOCKERFILE | hadolint | 2 | 0 | 0 | 0.8s | |
| ✅ GHERKIN | gherkin-lint | 2 | 0 | 0 | 1.01s | |
| ✅ JSON | npm-package-json-lint | yes | no | no | 0.32s | |
| ✅ JSON | prettier | 15 | 2 | 0 | 0 | 0.34s |
| ✅ JSON | v8r | 15 | 0 | 0 | 101.32s | |
| ✅ MARKDOWN | markdownlint | 9 | 0 | 0 | 0 | 0.82s |
| ✅ MARKDOWN | markdown-table-formatter | 9 | 0 | 0 | 0 | 0.28s |
| ✅ REPOSITORY | checkov | yes | no | no | 14.95s | |
| ✅ REPOSITORY | gitleaks | yes | no | no | 0.43s | |
| ✅ REPOSITORY | git_diff | yes | no | no | 0.01s | |
| grype | yes | no | 1 | 25.71s | ||
| ✅ REPOSITORY | secretlint | yes | no | no | 0.95s | |
| ✅ REPOSITORY | syft | yes | no | no | 1.87s | |
| ✅ REPOSITORY | trivy | yes | no | no | 5.36s | |
| ✅ REPOSITORY | trivy-sbom | yes | no | no | 0.24s | |
| ✅ REPOSITORY | trufflehog | yes | no | no | 3.28s | |
| ✅ SPELL | lychee | 62 | 0 | 0 | 1.73s | |
| ✅ YAML | prettier | 25 | 0 | 0 | 0 | 0.91s |
| ✅ YAML | v8r | 25 | 0 | 0 | 13.09s | |
| ✅ YAML | yamllint | 25 | 0 | 0 | 0.62s |
See detailed report in MegaLinter reports
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
Pull Request Report (#926)Static measures
Time related measures
Status check related measures
|
|
🎉 Hooray! The changes in this pull request went live with the release of v6.4.0 🎉 |
|
🎉 Hooray! The changes in this pull request went live with the release of v6.4.1 🎉 |




🚀 Hey, I have created a Pull Request
Description of changes
This PR implements a better cleanup strategy for container images by replacing the existing bots-house/ghcr-delete-image-action with dataaxiom/ghcr-cleanup-action and adding a new scheduled workflow for general image cleanup.
From now on a regular cron job will run, next to the already present PR image cleanup, to remove orphaned and untagged images. This means all images that are not part of a parent with a tag will be removed. Including multi-arch images and attestations and signatures.
✔️ Checklist