ci(dependabot): approve and merge updates via github-sts - #227
Merged
Conversation
The org is disabling "Allow GitHub Actions to create and approve pull requests", after which the built-in GITHUB_TOKEN cannot approve PRs. Bump the shared tempoxyz/mpp-tools dependabot reusable workflow to the revision that mints a short-lived App token via the github-sts action, grant id-token: write in place of the old write scopes, and add the trust policy the mint checks against. Follow-up to tempoxyz/mpp-tools#195.
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 repo's Dependabot auto-merge calls the sharedtempoxyz/mpp-toolsdependabot reusable workflow, and at runtime its approve/merge steps ran on this repo's built-in token.Follow-up to tempoxyz/mpp-tools#195, which migrated the reusable workflow to mint a short-lived GitHub App token via the
tempoxyz/gh-actions/actions/github-stsaction, scoped by a trust policy in the repository the workflow runs against.Changes
77de41d7— the migrated revision, currentmpp-toolsmain.checks: read,contents: read,pull-requests: read,id-token: writein place of the old write scopes; the approve and merge now happen with the STS-minted token..github/sts/dependabot.sts.yaml, narrowed so only runs triggered bydependabot[bot]that mint through the shared reusable workflow are grantedcontents: write+pull_requests: write.Things to verify before flipping the org setting (same as tempoxyz/mpp-tools#195)
id-token: writebefore relying on the new path.