Diverging Paths when Auto-Committing in Parallel Jobs #290
Unanswered
anerishah18
asked this question in
Help
Replies: 1 comment
-
What you certainly can do, is add a - name: Pull Remote Changes
run: git pull But I'm not this will work 100% of the time. By running jobs in parallel you're potentially creating a race-condition. Which commit should "win", if both commits are created in the same second? See also these threads, where others had a similar issue: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I have a workflow with jobs like the following running in parallel:
Say that job-1 finishes first. Trying to generate the auto-commit in job-2 says that the paths have diverged since job-1 already made a commit to the branch, making the branch checked out in job-2 behind the remote. I was wondering what the best way forward would be? I could make the auto-commit action force-push using the
push_options
config, but this would cause the changes from job-1 to be overwritten by the changes in job-2 even though the changes are not technically conflicting. Based on the searches I did, I couldn't really find a way to pull the latest branch before creating the auto-commit.Beta Was this translation helpful? Give feedback.
All reactions