`jobs.<job_id>.steps[*].working-directory` doesn't say it's incompatible with `uses`

Open Beginner friendly
#42,699 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
74/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Active
Tech stack
github-actions
Domain
documentation

Research direction

Start with the linked workflow syntax article at the jobs.<job_id>.steps.working-directory section, then inspect the referenced action-v1.0.json schema entry. Update the documentation to state that working-directory applies only to run steps and explain its behavior with uses steps, including composite actions; verify the revised wording against the schema and documented workflow behavior.

Written by the indexing model from the issue text.

Description

content github_actions
Code of Conduct
What article on docs.github.com is affected?

https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#jobsjob_idstepsworking-directory

What part(s) of the article would you like to see updated?

Using the working-directory keyword, you can specify the working directory of where to run the command.

- name: Clean temp directory
  run: rm -rf *
  working-directory: ./temp

It doesn't actually say that it only works for run: commands. And it doesn't explain what would happen if you use a uses: command that's implemented as a composite action.

Additional information

Apparently the languageservices code believes that working-directory is only valid for run-step things: https://github.com/actions/languageservices/blob/fb5c6e4f27bb1ddf512609a6a341aadd17ce86f3/workflow-parser/src/action-v1.0.json#L339-L372

Image
Dominant language
TypeScript
Stars
20.9k
Forks
68.8k
Avg merge
15h 4m
Merged PRs (30d)
103

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from github/docs

All issues in github/docs

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.