ghcr-delete-image-action
ghcr-delete-image-action copied to clipboard
Support user owner
At now only organization packages is supported, we need to add user packages support.
Any news on this? Support for owner and untagged images would be nice!
@kinoute Untagged images was released in v1.1.0.
See #168 for an implementation.
You should be able to test using:
delete-untagged-images:
permissions:
packages: write
name: Delete Untagged Images
runs-on: ubuntu-latest
steps:
- uses: lazyfrosch/ghcr-delete-image-action@main
# uses: bots-house/[email protected]
with:
owner: some-username
name: some-package
is_user: true
token: ${{ secrets.GITHUB_TOKEN }}
untagged-keep-latest: 3
I fixed this in a new project. https://github.com/dataaxiom/ghcr-cleanup-action. However, to implement this you can lookup the repository from the octokit api and test if it's an organization or a user project type. So you don't have to hard code it in the action setup.