Skip to content

Commit 7dfa250

Browse files
Use -C HEAD and --force-with-lease for safer amend push
- `--amend -C HEAD` instead of `--amend --no-edit`: preserves the original commit's author (not just message); bot becomes committer only - `--force-with-lease` instead of `--force`: fails if origin has advanced since checkout, preventing accidental overwrite of concurrent pushes Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 7c97831 commit 7dfa250

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/cd_release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ jobs:
7171
if: steps.update_version_step.outputs.continue_workflow == 'true'
7272
run: |
7373
git add app/__init__.py CHANGELOG.md
74-
git commit --amend --no-edit
74+
git commit --amend -C HEAD
7575
7676
- name: Update '${{ env.DEFAULT_REPO_BRANCH }}'
7777
if: steps.update_version_step.outputs.continue_workflow == 'true'
78-
run: git push --force origin ${{ env.DEFAULT_REPO_BRANCH }}
78+
run: git push --force-with-lease origin ${{ env.DEFAULT_REPO_BRANCH }}
7979

8080
publish_container_image:
8181
name: Publish Container image on GH Packages

0 commit comments

Comments
 (0)