-
Notifications
You must be signed in to change notification settings - Fork 970
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
expose defaults: run: working-directory: as env variable? #467
Comments
Isn't that just |
I searched for |
@bryanmacfarlane I think the issue is that |
Doing that right now... |
The setting is not picked up by custom actions (steps using |
Yeah, edit: so I think for |
Yes, and I did double check. My feature request is that it be exposed (readonly) so custom actions can use it. As mentioned above, Ruby world could use It for reading config files. I suspect more apps may also have the same need. Granted, custom actions are not |
Hello, any word on this? We also want our custom actions to be able to know if defaults.run.working-directory is set so we can run in that directory as well instead of the root. We've searched the context and other objects we can find to no avail. This is needed for working with monorepos easily. |
@TingluoHuang / @bryanmacfarlane , I just looked the code and it would be simple for me to do a pull request. OPTION 1 OPTION 2 Options 1 is a simpler change which I can go ahead submit a pull request for. Option 2 is a bigger change but not by much. I will do the work and submit the PR if I get confirmation from your team that this is a desired feature. Thanks! |
Is there any update on this? We would really love to have a way to access the |
I offered to do the work and submit a PR but never received confirmation from the github team if they were onboard. |
The workaround seems to be to set the working-directory in an environment variable and pass it to every job step: https://git.luolix.topmunity/t/use-working-directory-for-entire-job/16747/2 |
Thank you for your interest in the runner application and taking the time to provide your valuable feedback. We kindly ask you to redirect this feedback to the GitHub Community Support Forum which our team actively monitors and would be a better place to start a discussion for new feature requests in GitHub Actions. For more information on this policy please read our contribution guidelines. 😃 |
Recently the following was a welcome addition to the runner yaml syntax:
Some repos are actually several projects/packages/gems, etc, and they may use this feature. Often, various config files would be located in the working-directory, and custom actions may be loading them.
Hence, exposing
working-directory
as an env variable would allow the custom actions to make use of it. At present, the setting only seems to be used by run/script actions...NOTE: if the feature request has been agreed upon then the assignee will create an ADR. See docs/adrs/README.md
The text was updated successfully, but these errors were encountered: