Same user for Actions and commands

We’ve encountered an difficulty wherein jobs within a unmarried Github Actions workflow get different checkouts of the repo, notice the unique merge commit SHAs between these 2 jobs in a unmarried workflow run:



Is this expected conduct? Here Is there any way to guarantee all jobs inside a unmarried run of a workflow get the same copy of the repo?

A secondary precedence is a clean way to pick out whether we need to test merge commits on PRs, however checking out consistent code across all jobs is far more vital.

Filed a associated problem inside the moves/checkout repo, as it wasn’t at first clean to me whether or not this was an problem in Github Actions in popular or mainly in checkout/actions:


I presently have the trouble that I want to apply Actions and commands in the identical task in special steps. Docker Actions run as root and instructions as runner on the vm. This motive the trouble that commands can not get right of entry to files of a Docker Action without the use of sudo.

As a developer i don’t want to care about specific file proprietors in workflows and actions. There have to be one default user for Docker Actions, JavaScript Actions, native commands and commands in docker bins. So documents can be shared among them without converting the record proprietor.

@loskheri9 ,

When a workflow run is triggered on a commit ref (SHA), by default the checkout action will only checkout this commit ref. However, you can use the input parameter “ref” to specify a specific branch ref, tag ref or commit ref to checkout (see here).