We’ve encountered an issue where jobs within a single Github Actions workflow get different checkouts of the repo, note the different merge commit SHAs between these 2 jobs in a single workflow run:
I believe this order of events is the root cause:
job1 runs actions/checkout
master branch changes
job2 runs actions/checkout
Is this expected behavior? Is there any way to guarantee all jobs within a single run of a workflow get the same copy of the repo?
A secondary priority is a clear way to choose whether we want to test merge commits on PRs, but testing consistent code across all jobs is far more important.
Filed a related issue in the actions/checkout repo, as it wasn’t originally clear to me whether this was an issue in Github Actions in general or specifically in checkout/actions: