nektos / act

Run your GitHub Actions locally 🚀
https://nektosact.com
MIT License
54.89k stars 1.37k forks source link

Allows configuration of workdir (GITHUB_WORKSPACE) for containers created by act #1909

Open theodiem opened 1 year ago

theodiem commented 1 year ago

Act version

0.2.48

Feature description

Currently act sets the workdir (and thus GITHUB_WORKSPACE env var) for its created containers to the current dir which act is called from. On certain platforms/scenarios this can lead to awful long paths also with possible unicode/etc. Making use of jobs.steps[].run.working-directory only partially solves the issue since there are incompatibilities with other actions such as reported in https://github.com/actions/checkout/issues/197 .

Would be nice to be able to configure in .actrc the workdir/GITHUB_WORKSPACE used when it creates containers. In the past it was fixed to /github/workspace and then it was updated to use the current dir. Would be nice to be able to actually specify it.

Flyingmana commented 1 year ago

I would also like to have a way to configure this. The Action SonarSource/sonarcloud-github-action parses code coverage files(which contain absolut file paths) and on github its always using /github/workspace making it needed to have a step which changes paths accordingly.

https://github.com/OpenMage/magento-lts/blob/6a3a92e47cfeacfe9ebfe684ea5f48e662a5f974/.github/workflows/sonar.yml#L50-L71

leleobhz commented 2 weeks ago

Hello!

This issue also affects me ( https://github.com/BaileyJM02/markdown-to-pdf/blob/main/src/github_interface.js#L12 is not configurable and triggers https://github.com/BaileyJM02/markdown-to-pdf/blob/main/src/github_interface.js#L44 ).

It's possible to do it compatible with Github folder structure - or at least configurable?