Skip to content

Conversation

n3rdc4ptn
Copy link
Member

What this PR does / why we need it:

This pull request updates the GitHub Actions workflow for cleaning up container images, simplifying the implementation and adding flexibility for manual executions. The most important changes include introducing a dry-run option for workflow dispatch events and replacing custom cleanup logic with a reusable GitHub Action.

Enhancements to workflow flexibility:

  • Added a dry-run input to the workflow_dispatch event, allowing users to test the cleanup process without making actual changes. The input is optional, defaults to true, and is of type boolean. (.github/workflows/clean-main-images.yml, .github/workflows/clean-main-images.ymlR7-R12)

Simplification of cleanup logic:

  • Replaced the custom shell script for cleaning up container images with the dataaxiom/ghcr-cleanup-action@v1 GitHub Action. This action handles deleting tags, untagged images, ghost images, and partial images, while respecting the dry-run input and keeping a specified number of tagged images.

@n3rdc4ptn n3rdc4ptn self-assigned this Jun 4, 2025
Copy link
Contributor

@enrico-kaack-comp enrico-kaack-comp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@n3rdc4ptn n3rdc4ptn merged commit 74ec81c into main Jun 4, 2025
5 checks passed
@n3rdc4ptn n3rdc4ptn deleted the improve-image-cleanup-for-untagged branch June 4, 2025 12:33
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

Successfully merging this pull request may close these issues.

2 participants