Skip to content

Expose runner version in the runner context #26440

Answered by BrightRan
scottohara asked this question in Actions
Discussion options

You must be logged in to vote

@scottohara ,

The directory " /Users/runner/runners/2.164.0/work/foo/foo" actually is the workspace (the default working directory, github.workspace ) for the job1 that runs on macos-latest in your workflow, and you can easily use the property " github.workspace" of the github context to access this directory.

So, on job2 , you do not need to set this directory as a hardcoded in the command line, as you mentioned you can use the outputs.

You can do as the following steps:
1) On job1 , use the syntax “jobs.<jobs_id>.outputs” to set a job-level output to store the workspace of job1.

2) On job2 , because job2 needs job1 must complete successfully before job2 will run, you should use the synt…

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants