diff --git a/.github/workflows/sync-checklist.yml b/.github/workflows/sync-checklist.yml index c577b52..0120b1b 100644 --- a/.github/workflows/sync-checklist.yml +++ b/.github/workflows/sync-checklist.yml @@ -7,6 +7,15 @@ on: permissions: contents: write +# Multiple issues can close at once (bulk-close in the UI, a loop of +# `gh issue close`, a board automation, etc.), each firing its own run of +# this workflow. Without serializing, concurrent runs can race pushing to +# main and silently drop a checkbox update. Queue runs instead of canceling +# them so every closed issue's update lands. +concurrency: + group: sync-checklist-${{ github.repository }} + cancel-in-progress: false + jobs: sync-checklist: runs-on: ubuntu-latest @@ -59,4 +68,10 @@ jobs: git config user.email "41898282+github-actions[bot]@users.noreply.github.com" git add APPLICATION.md README.md git commit -m "docs: mark checklist item ${{ steps.slug.outputs.slug }} complete" - git push origin HEAD:main + # Belt-and-suspenders alongside the concurrency group above: rebase + # onto main before pushing in case anything else advanced it. + for attempt in 1 2 3; do + git pull --rebase origin main && git push origin HEAD:main && break + echo "Push attempt ${attempt} failed; retrying..." + sleep $((attempt * 3)) + done