Skip to content

Conversation

n3rdc4ptn
Copy link
Member

@n3rdc4ptn n3rdc4ptn commented May 28, 2025

What this PR does / why we need it:
As the current cleanup does not worked, this PR fixes it now.

This pull request introduces significant changes to the .github/workflows/clean-main-images.yml file to enhance the process of cleaning old container images. The workflow now uses the GitHub API directly for listing and deleting image tags, replacing the previous reliance on the actions/delete-package-versions action. Additionally, new environment variables have been added to improve flexibility and debugging capabilities.

Enhancements to the image cleanup workflow:

  • Direct GitHub API integration for image management: Replaced the actions/delete-package-versions action with custom scripts using the GitHub API to list and delete container image tags. This allows finer control over the cleanup process and better debugging capabilities.
  • Environment variable additions: Added new environment variables, including ORG and TAG_PREFIX, to improve configurability and flexibility in identifying and managing container tags.
  • Debugging improvements: Added steps to list tags before and after deletion for better visibility into the cleanup process, aiding debugging and validation.

@n3rdc4ptn n3rdc4ptn requested a review from Copilot May 28, 2025 08:14
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances the clean-main-images.yml workflow by introducing debug listings and replacing the existing delete-package-versions action with custom GitHub CLI commands for greater control over image cleanup.

  • Split and standardized environment variables (REGISTRY, ORG, TAG_PREFIX, GH_TOKEN)
  • Removed the actions/delete-package-versions step and added manual listing/delete steps with debugging
  • Added final verification to list remaining main- tags

@n3rdc4ptn n3rdc4ptn requested a review from andreaskienle May 28, 2025 08:23
@andreaskienle andreaskienle self-assigned this May 28, 2025
@n3rdc4ptn n3rdc4ptn merged commit 853e711 into main May 28, 2025
5 checks passed
@n3rdc4ptn n3rdc4ptn deleted the fix-package-cleanup branch May 28, 2025 12:14
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