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

Publish to ghcr.io #478

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Publish to ghcr.io #478

wants to merge 10 commits into from

Conversation

hardillb
Copy link
Member

@hardillb hardillb commented Mar 3, 2025

Also publish to GitHub's Docker container repository

part of #268

@hardillb hardillb self-assigned this Mar 3, 2025
@echoix
Copy link

echoix commented Mar 3, 2025

Do you expect some people to run workflows of this repo in their fork? If so, the part where the image name is predefined to be for ghcr.io/node-red/node-red might not work when authenticating with the ghcr from the fork (the github.repository_owner would be different). It should fail for an external user in their fork.

However, for GitHub packages (specifically for the docker registry), there's two types of permission handling, whether it is linked to a repo or not. (Packages don't have to be linked to a repo, but appear owned by an org). Note that other repos of the org could push. It's not clear for me yet what happens when a user (who has write access to a package in a org) tries to push to from an action in his fork.

There's some info here
https://docs.github.com/en/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility

Additionnally, it's a better practice to explicitly clear the permissions at the workflow level, and add back the ones needed per job. Here, it would additionally require the "packages", plus maybe "contents" (if the setting in Actions > General > Workflow permissions is set to "read repository contents and packages", the default for new repos and forks, which is generally enough for common, non-dangerous use cases. The unrestricted default should be changed if it isn't already).

@hardillb
Copy link
Member Author

hardillb commented Mar 3, 2025

No, we do not expect others to run this action, it only runs when we cut a Node-RED release.

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