From 746c49af2c4737955506a1c14d66e264eb792bfd Mon Sep 17 00:00:00 2001 From: Casper Welzel Andersen Date: Tue, 21 Apr 2026 15:27:21 +0200 Subject: [PATCH 1/2] Amend latest commit instead of creating a new one MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The version's patch number equals the commit count. Creating a new commit changes that count, causing invoke setver to find another version bump on the next CD run — an infinite loop. Amending the triggering commit keeps the count unchanged, so the subsequent CD run finds no version change and stops. Force push is needed because the amended SHA differs from origin, but is safe here since allow_force_pushes is enabled and TEAM4-0 has the ruleset admin bypass. --- .github/workflows/cd_release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cd_release.yml b/.github/workflows/cd_release.yml index 8b8e281d..67780e35 100644 --- a/.github/workflows/cd_release.yml +++ b/.github/workflows/cd_release.yml @@ -71,11 +71,11 @@ jobs: if: steps.update_version_step.outputs.continue_workflow == 'true' run: | git add app/__init__.py CHANGELOG.md - git commit -m "[bot] Update version and CHANGELOG" + git commit --amend --no-edit - name: Update '${{ env.DEFAULT_REPO_BRANCH }}' if: steps.update_version_step.outputs.continue_workflow == 'true' - run: git push origin ${{ env.DEFAULT_REPO_BRANCH }} + run: git push --force origin ${{ env.DEFAULT_REPO_BRANCH }} publish_container_image: name: Publish Container image on GH Packages From ad26169c1e754b15b9d732973ef6084818ae414e Mon Sep 17 00:00:00 2001 From: "CasperWA[ai][bot]" Date: Tue, 21 Apr 2026 15:31:57 +0200 Subject: [PATCH 2/2] 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 --- .github/workflows/cd_release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cd_release.yml b/.github/workflows/cd_release.yml index 67780e35..d81cdab6 100644 --- a/.github/workflows/cd_release.yml +++ b/.github/workflows/cd_release.yml @@ -71,11 +71,11 @@ jobs: if: steps.update_version_step.outputs.continue_workflow == 'true' run: | git add app/__init__.py CHANGELOG.md - git commit --amend --no-edit + git commit --amend -C HEAD - name: Update '${{ env.DEFAULT_REPO_BRANCH }}' if: steps.update_version_step.outputs.continue_workflow == 'true' - run: git push --force origin ${{ env.DEFAULT_REPO_BRANCH }} + run: git push --force-with-lease origin ${{ env.DEFAULT_REPO_BRANCH }} publish_container_image: name: Publish Container image on GH Packages