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:
1. job1 runs actions/checkout
2. master branch changes
3. 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:
Thank you for being here and apologies for the delay in response. Thanks for opening the issue on the actions repo, at this time I don't have any updates but wanted you to know the team is checking those issues and will reply as soon they can. Thanks again!
Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!