Exam GH-200 Topic 3 Question 7 Discussion
Actual exam question for Microsoft's GH-200 exam
Question #: 7
Topic #: 3
Question #: 7
Topic #: 3
Which command can you include in your workflow file to set the output parameter for an action?
Suggested Answer: A Vote an answer
GitHub Actions uses the special GITHUB_OUTPUT environment file to define output parameters for a workflow step. The required format is name=value, appended to the file. Therefore, writing action_color=purple to $GITHUB_OUTPUT correctly creates an output named action_color. The step should also have an id if another step needs to reference the value through the steps. < id > .outputs context.
GITHUB_ENV serves a different purpose: it creates environment variables for subsequent steps in the same job. The add-mask workflow command masks sensitive values in logs, while debug writes diagnostic information. Neither defines an output parameter. GitHub ' s current workflow-command documentation explicitly identifies GITHUB_OUTPUT as the supported environment file for setting step outputs.
GITHUB_ENV serves a different purpose: it creates environment variables for subsequent steps in the same job. The add-mask workflow command masks sensitive values in logs, while debug writes diagnostic information. Neither defines an output parameter. GitHub ' s current workflow-command documentation explicitly identifies GITHUB_OUTPUT as the supported environment file for setting step outputs.
by Harry at Oct 10, 2026, 04:01 PM
0
0
0
10
Comments
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.
Report Comment
Commenting
You can sign-up / login (it's free).