workspace for jobs uses repo/repo instead of org/repo
Describe the bug
The workspace for the job is repo/repo not org/repo, while using self-hosted runners on github.com with a single organisation that is fine, but against enterprise there may be multiple orgs with the same repo name that are used by the same runners.
Example: /home/ubuntu/actions-runner/_work/actions-test/actions-test instead of /home/ubuntu/actions-runner/_work/testorg/actions-test
Runner Version and Platform
Version of your runner? 2.273.5
OS of the machine running the runner? Ubuntu 20.04.2 LTS
repo/repo: the first repo is for which repo the workflow is coming from, the second repo is for the repository you checkout.
you can use actions/checkout to checkout multiple repositories in a single job, then you will get the following on disk:
repo/repo
repo/repo1
repo/repo2
would it make more sense then to go org/repo/(checkout)repo ?
like:
org/repo/repo
org/repo/repo1
org/repo/repo2
I'm not sure actions/checkout works that way with the GHES and the self-hosted runner.
I've tried putting a second actions/checkout step in and with just the repository parameter, it just overwrote the _work/repo/repo directory, I tried adding a path parameter, and it just checked it out in _work/repo/repo/path
Seems to work the same way in github.com hosted runners, the working directory is repo/repo and actions/checkout does repo/repo/repo1.
I did some testing with a self-hosted runner and a cloud runner.
We have the same problem in our projects with large repository names. We're using GitHub EMU. I think better for everyone is you can set a work folder in the "on runner" statements. And we can chose a name that works to the project and don't have a large path that damages your build. Lots of our repository builds doesn't work because that.
Where was "repo/repo/" could be "s/" for example.
I wonder if it would be better to just be a uuid (eg. 6b4ac2f5-7b3d-43b1-b9b0-f336e5e74bff/)