You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've got this working on my project here: neuroscout/neuroscout-cli#136
I set it up to build based on Docker Hub builds using the same meta-data.
One thing I noticed is that for some reason, using {{ secrets.GITHUB_TOKEN }} did not work for me. Instead, I had to create a personal token from my account, and add it to the repository secrets.
To authenticate to the Container registry within a GitHub Actions workflow, use the GITHUB_TOKEN for the best security and experience. 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.
Sorry I updated my comments from under your feet but I think I found the problem.
It's very unintuitive but even though a package is linked with a repo, that doesn't mean the repo's actions are automatically authorized to push to that package.
Ah gotcha! Do you want to PR to update the docs here and clarify what you did so the next person doesn’t run into the same issue? It would be greatly appreciated.
Activity
adelavega commentedon Aug 16, 2021
Actually looks like the docs were say:
https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry
And this guide says you must give permission to a specific repo's actions for a given package: https://docs.github.com/en/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions#upgrading-a-workflow-that-accesses-ghcrio
vsoch commentedon Aug 16, 2021
It should indeed work - I think there could be a few reasons it wouldn't:
If you can give me a more specific error message I could perhaps help - I'm going for my run now but will be back in about an hour!
adelavega commentedon Aug 16, 2021
Sorry I updated my comments from under your feet but I think I found the problem.
It's very unintuitive but even though a package is linked with a repo, that doesn't mean the repo's actions are automatically authorized to push to that package.
adelavega commentedon Aug 16, 2021
I had to manually add the repo there.
vsoch commentedon Aug 16, 2021
Ah gotcha! Do you want to PR to update the docs here and clarify what you did so the next person doesn’t run into the same issue? It would be greatly appreciated.
adelavega commentedon Aug 16, 2021
Sure! I'll know shortly that this fixes my issue. I can also confirm I did the two things you mentioned above and that wasn't enough.