From 77b7416d1fa9ba3fabd86a7069b15bf1bdecb2a9 Mon Sep 17 00:00:00 2001 From: Gabriel Radureau Date: Tue, 7 Apr 2026 08:18:19 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=84=20fix:=20ensure=20sequential=20pus?= =?UTF-8?q?hes=20work=20from=20updated=20HEAD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/ci-cd.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitea/workflows/ci-cd.yaml b/.gitea/workflows/ci-cd.yaml index cc6720b..65a7955 100644 --- a/.gitea/workflows/ci-cd.yaml +++ b/.gitea/workflows/ci-cd.yaml @@ -121,6 +121,9 @@ jobs: for i in 1 2 3; do if git push; then echo "Successfully updated coverage badge to ${COVERAGE}%" + # Update local repo to the new HEAD after successful push + git fetch origin + git reset --hard origin/${{ github.ref_name }} break else echo "Push attempt $i failed, retrying..." @@ -128,6 +131,9 @@ jobs: echo "Final push attempt failed - another job may have updated the badge" git pull --rebase || true git push || echo "Recovery push also failed" + # Ensure we're on the latest commit even if push failed + git fetch origin + git reset --hard origin/${{ github.ref_name }} fi sleep 2 fi