ci(cargo-update-pr): open the update PR via github-sts - #14
Merged
Merged
Conversation
The org is disabling "Allow GitHub Actions to create and approve pull requests", after which the built-in GITHUB_TOKEN cannot open PRs. Replace the token secret (documented as GITHUB_TOKEN) with an in-workflow github-sts mint against the caller repo's cargo-update-pr policy. No repository currently calls this workflow; it is a stale duplicate of the copy in tempoxyz/gh-actions, so deleting it is a reasonable alternative.
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.
Motivation
We are disabling the org-level "Allow GitHub Actions to create and approve pull requests" setting, after which the built-in
GITHUB_TOKENcan no longer open or approve pull requests. This reusable workflow took atokensecret documented asGITHUB_TOKENand handed it topeter-evans/create-pull-request.No repository currently calls this workflow, and it is a stale duplicate of the canonical copy in
tempoxyz/gh-actions(migrated in a sibling PR). Deleting this file instead is a perfectly good alternative — this PR migrates it so the repo carries nothing that depends on the org setting either way.Changes
tokensecret with an in-workflow STS mint (tempoxyz/gh-actions/actions/github-sts, SHA-pinned, policycargo-update-pr), scoped to whichever repository calls the workflow.contents: read+id-token: writeon the job; callers grant the same on their calling job and carry a.github/sts/cargo-update-pr.sts.yamlpolicy grantingcontents: write+pull_requests: write.peter-evans/create-pull-request.