Skip to content

Commit c804797

Browse files
authored
Replace push-protected with direct push via TEAM4-0 bypass (#721)
Replace push-protected with direct push via TEAM4-0 bypass 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 checkout step uses RELEASE_PAT so the persisted credential is already TEAM4-0's token, and the CD workflow pushes directly via git push — no remote URL manipulation needed. Also removes the dead push-action/** trigger from ci_tests.yml, which only existed to support push-protected's temp branches.
1 parent 0a48c4e commit c804797

2 files changed

Lines changed: 2 additions & 8 deletions

File tree

.github/workflows/cd_release.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727
uses: actions/checkout@v6
2828
with:
2929
fetch-depth: 0
30+
token: ${{ secrets.RELEASE_PAT }}
3031

3132
- name: Set up git config
3233
run: |
@@ -74,13 +75,7 @@ jobs:
7475
7576
- name: Update '${{ env.DEFAULT_REPO_BRANCH }}'
7677
if: steps.update_version_step.outputs.continue_workflow == 'true'
77-
uses: CasperWA/push-protected@v2
78-
with:
79-
token: ${{ secrets.RELEASE_PAT }}
80-
branch: ${{ env.DEFAULT_REPO_BRANCH }}
81-
pre_sleep: 15
82-
force: false
83-
unprotect_reviews: true
78+
run: git push origin ${{ env.DEFAULT_REPO_BRANCH }}
8479

8580
publish_container_image:
8681
name: Publish Container image on GH Packages

.github/workflows/ci_tests.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ on:
55
push:
66
branches:
77
- 'master'
8-
- 'push-action/**' # Allow pushing to protected branches (using CasperWA/push-protected)
98

109
jobs:
1110
pre-commit_audit:

0 commit comments

Comments
 (0)