Skip to content

ci: Make auto-commit step resilient to concurrent pushes#24

Merged
andygrunwald merged 1 commit intomainfrom
andygrunwald/race-safe-auto-commit
May 3, 2026
Merged

ci: Make auto-commit step resilient to concurrent pushes#24
andygrunwald merged 1 commit intomainfrom
andygrunwald/race-safe-auto-commit

Conversation

@andygrunwald
Copy link
Copy Markdown
Contributor

Summary

The stefanzweifel/git-auto-commit-action does not pull or rebase before pushing — this is a deliberate non-goal upstream (see the action's README → "Limitations & Gotchas"). When this workflow runs concurrently with other actors pushing unrelated changes to main (e.g. a different folder), the action's internal git push is rejected as non-fast-forward and the workflow fails, even though the changes do not conflict.

This PR switches the auto-commit step to skip_push: true and adds a small shell retry loop that does git pull --rebase between push attempts. The pattern is the same as the one already proven in the EngineeringKiosk/podcast-metadata workflows.

Test plan

  • YAML still parses (workflow file shows up correctly in the Actions tab after merge)
  • On the next scheduled / dispatched run, the new "Push changes with retry" step runs only when changes_detected == 'true'
  • Verify a push race resolves cleanly (manually inducible by dispatching this workflow while pushing an unrelated commit)

🤖 Generated with Claude Code

The stefanzweifel/git-auto-commit-action does not pull or rebase before
pushing (this is a deliberate non-goal upstream). When this workflow
runs concurrently with other actors pushing unrelated changes to main
(e.g. a different folder), the action's internal git push is rejected
as non-fast-forward and the workflow fails — even though the changes
do not conflict.

Switch to skip_push and add a small retry loop that does git pull
--rebase between push attempts, mirroring the pattern already proven
in the EngineeringKiosk/podcast-metadata workflows.
@andygrunwald andygrunwald merged commit fc0d0fe into main May 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant