Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to use the GIthub TOKEN instead of PAT #29

Closed
pdonorio opened this issue Aug 6, 2021 · 1 comment
Closed

Update to use the GIthub TOKEN instead of PAT #29

pdonorio opened this issue Aug 6, 2021 · 1 comment

Comments

@pdonorio
Copy link

pdonorio commented Aug 6, 2021

Hello there, thanks for this!

Currently this action requires the Personal Access Token, as stated in the README:
https://github.com/bots-house/ghcr-delete-image-action/blame/main/README.md#L33

What would be better, if possible, is to use instead to the GITHUB_TOKEN secret (link), as the recommended way since it's already created for you and scoped.

In fact:

If your workflow is using a personal access token (PAT) to authenticate to ghcr.io, then we highly recommend you update your workflow to use the GITHUB_TOKEN.

found in https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#authenticating-to-the-container-registry

I already use this action for login to the registry which may give you inspiration since it's using the GITHUB_TOKEN.

Let me know if I can help!

@pdonorio
Copy link
Author

pdonorio commented Aug 6, 2021

So I have been spending the whole morning looking for the problem.

It seems the issue is with the GITHUB_TOKEN permissions which don't reach DELETION on packages at Organization level like containers are in Github, e.g. see this thread.

Closing as this currently can't be implemented.

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

No branches or pull requests

1 participant