github-action-locks
github-action-locks copied to clipboard
With 2 parallel runs of a job, run2 of job unlocks the lock created by run1 of job
In your example, with a timeout=1 (minute) and sleep=120 (seconds) and doing 3 runs of the same job, below is what happens
- run1 sets the lock
- run1 goes into 2 min sleep
- run2 tries to get lock for 1 min
- run2 fails to "set" lock but the post-entrypoint releases the lock set by run1
- run3 can now set the lock even though run1 has not completed
Is there a way to get around this problem?
Are these 3 runs happening within the same workflow? Or is it 3 different workflow executions happening at the same time?