docs
docs copied to clipboard
Please document `jobs.<job_id>.defaults.run.working-directory` because it's important
Code of Conduct
- [X] I have read and agree to the GitHub Docs project's Code of Conduct
What article on docs.github.com is affected?
https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_iddefaultsrun
What part(s) of the article would you like to see updated?
There should be a jobs.<job_id>.defaults.run.working-directory
https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_iddefaultsrun Says:
Use
jobs.<job_id>.defaults.runto provide defaultshellandworking-directoryto all run steps in the job. This keyword can reference several contexts. For more information, see "Contexts."
That should be visible in the ToC on the right, and have proper paragraphs. I shouldn't have to read the entire document to discover this.
Additional information
It should explain how it interacts with previous levels.
There's a workflow that uses a global:
defaults:
run:
working-directory: ruby
I have no idea how to reset the working directory to the default in one job.
@jsoref Thank you for opening an issue! I'll get this triaged for review ✨
Fwiw, jobs.<job_id>.defaults.run.working-directory does indeed work. But I shouldn't have had to guess.
@jsoref Thank you for your patience while we reviewed this! 👋
The team agrees documenting jobs.<job_id>.defaults.run.working-directory would be valuable. You, or anyone else, are welcome to submit a PR with this fix 💛