fix: use GitHub App token for release-please workflow#324
Open
dlevy-msft-sql wants to merge 1 commit intomicrosoft:mainfrom
Open
fix: use GitHub App token for release-please workflow#324dlevy-msft-sql wants to merge 1 commit intomicrosoft:mainfrom
dlevy-msft-sql wants to merge 1 commit intomicrosoft:mainfrom
Conversation
Replace GITHUB_TOKEN with GitHub App authentication to work around org policy blocking 'Allow GitHub Actions to create and approve pull requests'. Changes: - Add create-github-app-token step to generate token from App credentials - Pin actions to commit SHAs for supply chain security - Use app token for release-please-action Requires secrets: - RELEASE_PLEASE_APP_ID: GitHub App ID - RELEASE_PLEASE_APP_PRIVATE_KEY: GitHub App private key (.pem) This is more secure than PAT because: - Not tied to a user account - Tokens auto-rotate (1 hour expiry) - Survives user leaving org - Better audit trail
dlevy-msft-sql
added a commit
to dlevy-msft-sql/go-sqlcmd
that referenced
this pull request
Feb 4, 2026
Replace GITHUB_TOKEN with GitHub App authentication to work around org policy blocking 'Allow GitHub Actions to create and approve pull requests'. Changes: - Add create-github-app-token step to generate token from App credentials - Use app token for release-please-action Requires secrets: - RELEASE_PLEASE_APP_ID: GitHub App ID - RELEASE_PLEASE_APP_PRIVATE_KEY: GitHub App private key (.pem) Matches fix in microsoft/go-mssqldb#324
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #324 +/- ##
==========================================
- Coverage 75.46% 75.32% -0.14%
==========================================
Files 34 34
Lines 6598 6598
==========================================
- Hits 4979 4970 -9
- Misses 1333 1338 +5
- Partials 286 290 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Problem
The release-please workflow fails with:
\
GitHub Actions is not permitted to create or approve pull requests
\\
The org policy blocks enabling 'Allow GitHub Actions to create and approve pull requests' in repository settings.
Solution
Use a GitHub App for authentication instead of \GITHUB_TOKEN. This is also more secure than using a PAT:
Setup Required
After merging, add these repository secrets:
Creating the GitHub App
Changes
Fixes the release-please workflow failure.