Skip to content

Commit 03e2734

Browse files
committed
Fix CD release: use new commit instead of force-push to update master (#719)
Fix cd_release.yml: use a new commit and non-force push Branch protection on master has allow_force_pushes: false. The workflow was amending the last commit then force-pushing via push-protected, causing all CD runs to fail since ~December 2025. Fix by creating a plain new commit (fast-forward) and setting force: false in push-protected. Also update the deprecated sleep input to pre_sleep and enable unprotect_reviews: true to temporarily lift the PR-review requirement during the push. Add note to avoid cito the bot commit message so the version-bump commit does not trigger redundant workflow runs.
1 parent eae0c43 commit 03e2734

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

.github/workflows/cd_release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,17 +70,17 @@ jobs:
7070
if: steps.update_version_step.outputs.continue_workflow == 'true'
7171
run: |
7272
git add app/__init__.py CHANGELOG.md
73-
git commit --amend -C HEAD
73+
git commit -m "[bot] Update version and CHANGELOG [skip ci]"
7474
7575
- name: Update '${{ env.DEFAULT_REPO_BRANCH }}'
7676
if: steps.update_version_step.outputs.continue_workflow == 'true'
7777
uses: CasperWA/push-protected@v2
7878
with:
7979
token: ${{ secrets.RELEASE_PAT }}
8080
branch: ${{ env.DEFAULT_REPO_BRANCH }}
81-
sleep: 15
82-
force: true
83-
unprotect_reviews: false
81+
pre_sleep: 15
82+
force: false
83+
unprotect_reviews: true
8484

8585
publish_container_image:
8686
name: Publish Container image on GH Packages

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,3 +570,5 @@ MigrationBackup/
570570
constraints.txt
571571

572572
.*_cache/
573+
574+
.claude/

0 commit comments

Comments
 (0)