Replace push-protected with direct push via TEAM4-0 bypass#721
Conversation
The push-protected action relies on CI running on the push-action/** temp branch to satisfy required status checks before pushing to master. GitHub no longer triggers workflows for pushes made from within a running workflow, so the temp branch CI never runs, push-protected declares all checks vacuously complete, and the push fails. Instead, a repository ruleset now enforces required status checks on master with TEAM4-0 as an explicit bypass actor. The CD workflow pushes directly as TEAM4-0 using the RELEASE_PAT, bypassing the status check requirement for this automated bot commit.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #721 +/- ##
=======================================
Coverage 84.34% 84.34%
=======================================
Files 26 26
Lines 805 805
=======================================
Hits 679 679
Misses 126 126 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR updates the CD release workflow to stop using CasperWA/push-protected@v2 and instead push directly to master using a PAT intended to authenticate as the TEAM4-0 bot user, relying on a repository ruleset bypass for required status checks.
Changes:
- Replaced
CasperWA/push-protected@v2with a shell step that sets an authenticatedoriginURL and runsgit pushto the default branch.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Copilot review: actions/checkout persists GITHUB_TOKEN credentials that would override a remote URL change. Passing token: RELEASE_PAT to the checkout step ensures the persisted credential is already the RELEASE_PAT, so the git push uses it without needing to modify the remote URL.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
push-protected is no longer used so these temp branches are never created. The trigger and its explanatory comment are dead code.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
CasperWA/push-protected@v2with a directgit pushauthenticated as TEAM4-0.actions/checkoutnow usestoken: RELEASE_PATso the persisted credential is already TEAM4-0's PAT — no remote URL manipulation needed.master branch protection, id 15349357) enforces the 6 required status checks on master with TEAM4-0 as an explicit always-bypass actor (configured out-of-band via the GitHub API).required_status_checkshas been cleared (enforcement_level: off) so the ruleset is the sole enforcer.push-action/**branch trigger fromci_tests.yml.Why push-protected stopped working
push-protectedworks by pushing the commit to a temppush-action/**branch, waiting for CI to run there, then pushing to master. GitHub no longer triggers new workflow runs for pushes made from within a running workflow — even when using a PAT instead ofGITHUB_TOKEN. As a result the temp branch CI never starts,push-protecteddeclares all 0 jobs complete, and the push to master fails withGH006: 6 of 6 required status checks are expected.Why direct push now works
The new ruleset adds TEAM4-0 to the bypass list with
bypass_mode: always. Because the checkout step persists RELEASE_PAT as the git credential, the subsequentgit pushis authenticated as TEAM4-0 and is exempt from the status check requirement. All other pushes (PR merges by humans) still require the 6 checks to pass.Test plan
[bot] Update version and CHANGELOGcommit to master without theGH006error.Click to view squash commit message