[GH-ISSUE #1134] Enhancement: support for setting working directory in container #641

Closed
opened 2026-03-01 21:45:10 +03:00 by kerem · 1 comment
Owner

Originally created by @jacob-carlborg on GitHub (Apr 19, 2022).
Original GitHub issue: https://github.com/nektos/act/issues/1134

Describe feature

I would like to be able to set the working directory inside the container which is running the workflows. Currently Act is using the full path of the working directory where the act command is run, as the working directory inside the container. This usually does not match the working directory when a workflow is run on github.com. I would like the environment Act is using to run the workflows to be as similar as possible to the environment on github.com.

Originally created by @jacob-carlborg on GitHub (Apr 19, 2022). Original GitHub issue: https://github.com/nektos/act/issues/1134 ## Describe feature I would like to be able to set the working directory inside the container which is running the workflows. Currently Act is using the full path of the working directory where the `act` command is run, as the working directory inside the container. This usually does not match the working directory when a workflow is run on github.com. I would like the environment Act is using to run the workflows to be as similar as possible to the environment on github.com.
kerem 2026-03-01 21:45:10 +03:00
Author
Owner

@catthehacker commented on GitHub (Apr 21, 2022):

We don't use same path due to some issues we had, but you shouldn't hard-code GitHub runner paths. It's recommended to always use contexts and environment variables. Other than that, initial working directory doesn't really matter.

<!-- gh-comment-id:1105731425 --> @catthehacker commented on GitHub (Apr 21, 2022): We don't use same path due to some issues we had, but you shouldn't hard-code GitHub runner paths. It's recommended to always use contexts and environment variables. Other than that, initial working directory doesn't really matter.
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#641
No description provided.