Exam GH-200 Topic 1 Question 68 Discussion

Actual exam question for Microsoft's GH-200 exam
Question #: 68
Topic #: 1
Which syntax correctly accesses a job output (output1) of an upstream job (job1) from a dependent job within a workflow?

Suggested Answer: A Vote an answer

To access the outputs in the dependent job, use the needs.<job_id>.outputs.<output_name> syntax. For example, the following job accesses the output1 and output2 outputs defined in job1:
jobs:
# Assume job1 is defined as above
job2:
runs-on: ubuntu-latest
needs: job1
steps:
- env:
OUTPUT1: ${{needs.job1.outputs.output1}}
OUTPUT2: ${{needs.job1.outputs.output2}}
run: echo "$OUTPUT1 $OUTPUT2"
Reference:
https://docs.github.com/en/actions/how-tos/write-workflows/choose-what-workflows-do/pass-job- outputs

by Sebastiane at Jul 08, 2026, 07:55 AM

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Nick name: Submit Cancel
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

0
0
0
10