[GH-ISSUE #1909] Allows configuration of workdir (GITHUB_WORKSPACE) for containers created by act #922

Open
opened 2026-03-01 21:47:27 +03:00 by kerem · 2 comments
Owner

Originally created by @theodiem on GitHub (Jul 12, 2023).
Original GitHub issue: https://github.com/nektos/act/issues/1909

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.

Originally created by @theodiem on GitHub (Jul 12, 2023). Original GitHub issue: https://github.com/nektos/act/issues/1909 ### 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.
Author
Owner

@Flyingmana commented on GitHub (Oct 8, 2023):

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.

github.com/OpenMage/magento-lts@6a3a92e47c/.github/workflows/sonar.yml (L50-L71)

<!-- gh-comment-id:1752172973 --> @Flyingmana commented on GitHub (Oct 8, 2023): 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
Author
Owner

@leleobhz commented on GitHub (Oct 9, 2024):

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?

<!-- gh-comment-id:2402676862 --> @leleobhz commented on GitHub (Oct 9, 2024): 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?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#922
No description provided.