fix(release): use GH_PAT in checkout to bypass main branch ruleset#22
fix(release): use GH_PAT in checkout to bypass main branch ruleset#22warengonzaga merged 2 commits intodevfrom
Conversation
…eset Co-authored-by: warengonzaga <15052701+warengonzaga@users.noreply.github.com>
📦 Package Build Flow — Monorepo Build🔀 Pull Request Build — Pre-release package for testing PR changes
📥 Quick Install (changed packages)npm i @tinyclaw/types@2.0.0-patch.cfae164 @tinyclaw/plugins@2.0.0-patch.cfae164 @tinyclaw/plugin-channel-discord@2.0.0-patch.cfae164 @tinyclaw/plugin-channel-friends@2.0.0-patch.cfae164 @tinyclaw/plugin-provider-openai@2.0.0-patch.cfae164 tinyclaw@2.0.0-patch.cfae164This package was built automatically by the Package Build Flow action. |
There was a problem hiding this comment.
Pull request overview
This PR fixes a GitHub Actions authentication issue in the release workflow. The release-build-flow-action was unable to push changelog updates to the protected main branch because the checkout step was using the default GITHUB_TOKEN, which is blocked by branch rulesets. The fix ensures that the same GH_PAT secret used by the release action is also used for checkout, so git credentials are established under a user with ruleset bypass permissions.
Changes:
- Added
token: ${{ secrets.GH_PAT }}parameter to theactions/checkoutstep in the release workflow to align git credentials with the PAT used byrelease-build-flow-action
🔥 Container Build Complete - Patch BuildBuild Status: ✅ Success 📦 Pull ImageDocker Hub: docker pull warengonzaga/tinyclaw:patch-cfae164GHCR: docker pull ghcr.io/warengonzaga/tinyclaw:patch-cfae164📋 Build Details
🏷️ Image Tags• 🔍 Testing Your Changes
🚀 Quick Start# Pull and run the container
Docker Hub: docker pull warengonzaga/tinyclaw:patch-cfae164
docker run <your-options> <image>🔒 Security Scan Results📋 Pre-Build Security Checks✅ Source Code Scan: 0 vulnerabilities found 🐳 Container Image Vulnerabilities
📊 Detailed Security ReportsView detailed vulnerability reports in the GitHub Security tab. 🤖 Powered by Container Build Flow Action v1.2.0 |
The release workflow's
actions/checkoutstep was using the defaultGITHUB_TOKENfor git credentials, causing changelog pushes tomainto be blocked by the branch ruleset — even thoughGH_PATwas already passed torelease-build-flow-action.Change
.github/workflows/release.yml— addedtoken: ${{ secrets.GH_PAT }}to the checkout step so git credentials are established under the PAT owner (who has ruleset bypass), consistent with what the action itself usesWithout this,
release-build-flow-actionreceives the right token for API calls but git push operations fall back to theGITHUB_TOKENcredentials set by checkout, which the branch ruleset blocks.Original prompt
Created from VS Code.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.