Skip to content
Discussion options

You must be logged in to vote

When you use jobs.<job_id>.steps.run , using the working-directory keyword, you can specify the working directory of where to run the command. You need to add work-directory keyword to all jobs.<job_id>.steps.run.

Please refer to this document for more details.

https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsrun

If you want to use working-directory for entire job, I would suggest to set a job level environment variable, set its value with the directory, and then use context with ${{ env.variablename}} as the value of work-directory keyword in jobs.<job_id>.steps.run.  

For Contexts syntax for GitHub Actions …

Replies: 20 comments 18 replies

Comment options

You must be logged in to vote
10 replies
@seiwonpark
Comment options

@Adamou02
Comment options

@james-wangx
Comment options

@kubukoz
Comment options

@will-molloy
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@ktulark
Comment options

@nnnik
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@tshakah
Comment options

Comment options

You must be logged in to vote
1 reply
@janosh
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@uuf6429
Comment options

Comment options

You must be logged in to vote
1 reply
@ornakash
Comment options

Comment options

You must be logged in to vote
1 reply
@Jean1dev
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Adamou02
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Actions Build, test, and automate your deployment pipeline with world-class CI/CD