Job concurrency does not run latest HEAD #26827
-
Hi there, I came across a weird behaviour (at least not as expected) when using the If I now trigger two jobs in a row, the first job creates a new commit and the job passes. However, the latter seems to operate on the previous HEAD. The step As a workaround I run
stefanbuck/workflow-concurrency-issue/blob/47bab81cd67f66ff84e18229f572e8d5768fea93/.github/workflows/deployment-request.yaml#L12 Is this behaviour intentional / by design? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
I had another look and turns out that all is needed is to set the default branch as
From the
|
Beta Was this translation helpful? Give feedback.
-
I am so glad you posted this. I ran into the same issue thinking the default was to checkout HEAD already. |
Beta Was this translation helpful? Give feedback.
-
Great to see that posting the solution was already helpful to you 😀 |
Beta Was this translation helpful? Give feedback.
I had another look and turns out that all is needed is to set the default branch as
ref
to make the checkout action pull the latest HEADFrom the
checkout
docs