Skip to content

feat: clean up untagged images#12

Merged
ryboe merged 1 commit intomainfrom
cleanup_untagged_images
Feb 22, 2026
Merged

feat: clean up untagged images#12
ryboe merged 1 commit intomainfrom
cleanup_untagged_images

Conversation

@ryboe
Copy link
Owner

@ryboe ryboe commented Feb 22, 2026

Add GHA workflow that runs once a week on Sunday at midnight UTC and deletes all untagged images.

Add GHA workflow that runs once a week on Sunday at midnight UTC and deletes all
untagged images.
@ryboe ryboe requested a review from Copilot February 22, 2026 23:54
@ryboe ryboe merged commit 7dd9114 into main Feb 22, 2026
4 checks passed
@ryboe ryboe deleted the cleanup_untagged_images branch February 22, 2026 23:56
Copy link

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 adds a GitHub Actions workflow to automatically clean up untagged container images from GitHub Container Registry (GHCR). The workflow runs weekly on Sundays at midnight UTC and can also be triggered manually via workflow_dispatch. This helps maintain repository hygiene by removing orphaned image versions that are no longer needed.

Changes:

  • Added .github/workflows/cleanup.yml with a scheduled job to delete untagged container images using the actions/delete-package-versions action

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


on:
schedule:
- cron: 0 0 * * 0 # run at midnight every sunday
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

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

The comment incorrectly capitalizes 'sunday' - it should be 'Sunday' for proper grammar in documentation.

Suggested change
- cron: 0 0 * * 0 # run at midnight every sunday
- cron: 0 0 * * 0 # run at midnight every Sunday

Copilot uses AI. Check for mistakes.
- name: Delete untagged images
uses: actions/delete-package-versions@v5
with:
package-name: ${{ github.event.repository.name }}
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

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

The package-name should use 'github.repository' instead of 'github.event.repository.name'. For GitHub Container Registry packages, the full package name includes both the owner and repository name in the format 'owner/repo'. Using only the repository name will cause the action to fail to find the package. This is consistent with how the release workflow references packages using 'github.repository'.

Suggested change
package-name: ${{ github.event.repository.name }}
package-name: ${{ github.repository }}

Copilot uses AI. Check for mistakes.
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