exam questions

Exam GH-200 All Questions

View all questions & answers for the GH-200 exam

Exam GH-200 topic 1 question 26 discussion

Actual exam question from Microsoft's GH-200
Question #: 26
Topic #: 1
[All GH-200 Questions]

Which scopes are available to define custom environment variables within a workflow file? (Choose three.)

  • A. the entire workflow, by using env at the top level of the workflow file
  • B. all jobs being run on a single Actions runner, by using runner.env at the top of the workflow file
  • C. the entire stage, by using env at the top of the defined build stage
  • D. within the run attribute of a job step
  • E. the contents of a job within a workflow, by using jobs.env
  • F. a specific step within a job, by using jobs..steps[*].env
Show Suggested Answer Hide Answer
Suggested Answer: AEF 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
MaharshiRabari
9 hours, 46 minutes ago
Selected Answer: AEF
Why option D is NOT correct D. within the run attribute of a job step In GitHub Actions, environment variables can only be defined using the env: block, not inside the run: block. Inside a run: block, you can use variables or export shell variables, but that does not create a GitHub Actions environment variable in the YAML sense.
upvoted 1 times
...
0a9a335
1 month, 1 week ago
Selected Answer: ADF
The correct scopes for defining custom environment variables within a GitHub Actions workflow file are: A. the entire workflow, by using env at the top level of the workflow file D. within the run attribute of a job step F. a specific step within a job, by using jobs.<job_id>.steps[*].env
upvoted 1 times
...
[Removed]
2 months, 1 week ago
Selected Answer: D
D is the only option that isn't immediately wrong.
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
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.

SaveCancel
Loading ...