From e335729399fbc03dd82d0d7c3e8502c0c6d88598 Mon Sep 17 00:00:00 2001 From: Daniel Volz Date: Mon, 9 Feb 2026 21:09:45 +0100 Subject: [PATCH] fix: prevent badge workflow push rejection on concurrent runs (#151) Add git pull --rebase before push to handle cases where main moved between checkout and push (e.g., two Docker builds triggering badge updates simultaneously). Also add concurrency group to cancel duplicate runs. --- .github/workflows/update-test-badges.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/update-test-badges.yml b/.github/workflows/update-test-badges.yml index 978f3b5..481e396 100644 --- a/.github/workflows/update-test-badges.yml +++ b/.github/workflows/update-test-badges.yml @@ -10,6 +10,11 @@ on: permissions: contents: write +# Prevent parallel badge workflows from racing each other +concurrency: + group: update-test-badges + cancel-in-progress: true + jobs: update-badges: name: Update Test Count Badges @@ -99,5 +104,8 @@ jobs: echo "No badge changes to commit" else git commit -m "chore: update test count badges [skip ci]" + # Rebase on latest main to avoid push rejection when concurrent + # badge workflows or other [skip ci] commits land between checkout and push + git pull --rebase origin main git push fi