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 |
…rkflows (#20) * ⚙️ setup: add Biome linter with CI integration * ☕ chore: apply Biome lint and formatting fixes across codebase * ⚙️ setup: add CodeQL analysis and Dependabot dependency scanning * 🔧 update (ci): merge commit lint into CI workflow as commits job * 🔧 update (ci): change Dependabot labels to security and infra * 🔧 update (release): use GH_PAT token in checkout to bypass branch ruleset (#22) * Initial plan * 🔧 update (release): use GH_PAT token in checkout to bypass branch ruleset Co-authored-by: warengonzaga <15052701+warengonzaga@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: warengonzaga <15052701+warengonzaga@users.noreply.github.com> * ☕ chore: fix all Biome lint errors, base on dev branch (#23) * ☕ chore: initial plan for lint fixes * ☕ chore: fix all 14 bun lint errors using Biome * 🔧 update: address code review comments on dead code and invariant handling * 🔧 update: fix regex pattern in correction patterns for better matching * ⚙️ setup: add CI tolerance for bot commits and update AGENTS.md * 🔧 update: reorder correction patterns for consistency --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Waren Gonzaga <opensource@warengonzaga.com> * 🔧 update: optimize Base32 decoding by trimming trailing '=' characters * 🔧 update: improve condition evaluation by refining keyword extraction * 🔧 update (delegation): replace any casts with proper type annotations - use QueryTier type instead of any for tier casts in background.ts and tools.ts - use err instanceof Error guard instead of err: any in runner.ts - use Parameters<TemplateManager['update']>[1] for template updates - replace non-null assertions with optional chaining in templates.test.ts Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🔧 update (config): use nullish coalescing instead of non-null assertion Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🔧 update (heartware): use typed error intersection instead of any cast Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🔧 update (nudge): replace any casts with proper type annotations - type PulseJob extension instead of any for __touchActivity property - import and use OutboundSource type in categoryToSource return type - map companion category to agent source value - replace any with unknown in intercom handler signatures Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🔧 update (sandbox): use typed record cast instead of any for globalThis access Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🔧 update (shield): improve type safety and add biome-ignore comments - use nullish coalescing instead of non-null assertion for toolName - reformat keywords chain for readability - add biome-ignore comments for intentional any usage in tests Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🔧 update (discord): add biome-ignore comment for intentional any in test Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🔧 update (cli): replace any casts with proper type annotations - use nullish coalescing for non-null assertions in setup.ts, supervisor.ts, banner.ts - use typed record cast for dynamic property access in start.ts shutdown handlers - replace any with unknown in test mock signatures Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * 🔧 update (web): replace any casts with proper type annotations - add typed server parameter for getClientIP instead of any - use explicit fallback instead of non-null assertion for claimToken - add null check before returning recovery attempt record in security-db - replace any with unknown in test mock signatures Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * ⚙️ setup: update husky prepare script to ensure compatibility * 🔧 update (nudge): add IntercomEvent interface to fix TS18046 errors --------- Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: warengonzaga <15052701+warengonzaga@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.