-
-
Notifications
You must be signed in to change notification settings - Fork 219
ci: ensure the auto-created release-please action runs CI
#713
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
Open
lumirlumir
wants to merge
2
commits into
main
Choose a base branch
from
lumirlumir-patch-1
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about this, but per https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#permissions, "If you specify the access for any of these permissions, all of those that are not specified are set to
none", which meanscontentswill benonefor steps that useGITHUB_TOKEN? Docs for trusted publishing (https://docs.npmjs.com/trusted-publishers#step-2-configure-your-cicd-workflow) havecontents: readin the example, so perhaps it would be safer to changewrite->readinstead of just removing the line?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would still work well if we remove
contents: writeorcontents: readfor the following reasons:According to https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#permissions, the
permissionsfield applies toGITHUB_TOKEN, not to Personal Access Tokens (fine-grained or classic) such asWORKFLOW_PUSH_BOT_TOKEN. (This change now removes the use ofGITHUB_TOKEN.)As far as I know, the permissions for
WORKFLOW_PUSH_BOT_TOKENare set when the token is created, not by the explicitpermissionsfield in GitHub Actions. For example, with the following token settings (the example below shows a classic token):As far as I know,
content: writeorcontents: readaren't related to OIDC; onlyid-tokenis:For example, when I publish my personal open-source packages, I only use
id-token: write, and it works fine withoutcontents: read.Ref: https://github.com/lumirlumir/npm-clang-format-node/blob/5eeae2da116c405395eaf13391500c18e416f421/.github/workflows/publish.yml#L7-L8
Also, in https://github.com/eslint/css/pull/330/changes, we removed the
contents: writefield as shown below, yet the auto-created workflow was generated correctly and the CI ran successfully.Given the reasons above, I think this would work well; however, if you’re still unsure, I’m happy to follow your guidance and update the workflow to use
contents: read.