diff --git a/.gitea/actions/publish-report/action.yml b/.gitea/actions/publish-report/action.yml index 1d7d7a4..f7a2164 100644 --- a/.gitea/actions/publish-report/action.yml +++ b/.gitea/actions/publish-report/action.yml @@ -125,4 +125,12 @@ runs: git add reports/ git diff --cached --quiet && echo "No changes" && exit 0 git commit -m "ci: update test report [skip ci]" - git push --force origin ${{ github.ref_name }} + # rebase onto commits pushed in the meantime instead of overwriting them; + # on conflicts in reports/ the freshly generated report wins + for attempt in 1 2 3; do + git pull --rebase --autostash -X theirs origin ${{ github.ref_name }} + git push origin ${{ github.ref_name }} && exit 0 + echo "Push rejected (attempt $attempt), retrying..." + sleep 5 + done + exit 1