Use GITHUB_TOKEN instead of ADMIN_PAT in release workflows - #90
Closed
n13 wants to merge 1 commit into
Closed
Conversation
The org-level ADMIN_PAT stopped authenticating (HTTP 401 on gh pr create). Creating the release PR and the GitHub release only needs the workflow token with pull-requests: write and contents: write.
Contributor
Author
|
Closing: ADMIN_PAT was rotated instead; the org policy blocks Actions-created PRs and token-created PRs would not trigger CI. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The release-proposal workflow failed at
gh pr createwithHTTP 401: Bad credentials(https://github.com/Quantus-Network/qp-zk-circuits/actions/runs/33382620939): the org secretADMIN_PATno longer authenticates. Nothing here needs a PAT, so this drops it:gh pr createin the release-proposal workflow(s) andgh release createin the tag-and-publish workflow(s) now use the built-ingithub.token.pull-requests: write(it already hadcontents: writefor the branch push); the publish job already hascontents: write, which is allgh release createneeds.Two things to know:
gh pr createis refused. It is currently off on this repo. Equivalent API call:gh api -X PUT repos/Quantus-Network/<repo>/actions/permissions/workflow -f default_workflow_permissions=read -F can_approve_pull_request_reviews=truegithub.tokendo not triggerpull_requestworkflows, so the automated release PR will show no CI checks. The tag-and-publish workflow still runs format, build, clippy, doc and audit at the tag before anything is published, and no status checks are required by branch protection.