Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

GitHub Exam GitHub-Actions Topic 3 Question 6 Discussion

Actual exam question for GitHub's GitHub-Actions exam
Question #: 6
Topic #: 3
[All GitHub-Actions Questions]

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

Show Suggested Answer Hide Answer
Suggested Answer: A, D, F

You can define environment variables for the entire workflow by using the env key at the top level of the workflow file. These environment variables will be available to all jobs and steps within the workflow.

Environment variables can also be set within the run attribute of a job step, and these variables will be scoped only to that specific step.

You can set environment variables for specific steps within a job by using jobs.<job_id>.steps[*].env, which allows you to define variables that will only be available to that step.


Contribute your Thoughts:

Vilma
2 months ago
This is a tricky one! I'm going to guess A, C, and E. Hopefully, I'm not missing any obvious options.
upvoted 0 times
...
Talia
2 months ago
Haha, I bet the exam writers are having fun with all these different scopes. Time to put on my thinking cap!
upvoted 0 times
Belen
16 days ago
E) the contents of a job within a workflow, by using jobs..env
upvoted 0 times
...
Vanda
1 months ago
C) the entire stage, by using env at the top of the defined build stage
upvoted 0 times
...
Annita
1 months ago
A) the entire workflow, by using env at the top level of the workflow file
upvoted 0 times
...
...
Ashley
2 months ago
D and F seem a bit too specific for defining cusAshley env vars at the workflow level. I'd stick with the broader scopes.
upvoted 0 times
Ozell
1 months ago
C) the entire stage, by using env at the top of the defined build stage
upvoted 0 times
...
Kenny
1 months ago
B) all jobs being run on a single Actions runner, by using runner.env at the top of the workflow file
upvoted 0 times
...
Golda
2 months ago
A) the entire workflow, by using env at the top level of the workflow file
upvoted 0 times
...
...
Tula
2 months ago
I'm not sure about option E. Can someone explain why that scope is available for defining environment variables?
upvoted 0 times
...
Ardella
2 months ago
I agree with Jess. Those scopes make sense for defining environment variables in a workflow file.
upvoted 0 times
...
Jess
3 months ago
I think the available scopes to define custom environment variables are A, C, and E.
upvoted 0 times
...
Willard
3 months ago
A, C, and E sound like the right options to me. I'll go with those.
upvoted 0 times
Micaela
2 months ago
Let's go with A, C, and E then.
upvoted 0 times
...
Twila
2 months ago
I agree, those seem like the right choices.
upvoted 0 times
...
Jettie
2 months ago
I think A, C, and E are the correct options.
upvoted 0 times
...
...

Save Cancel