GH-200 · Question #45
As a developer, you are designing a workflow and need to communicate with the runner machine to set environment variables, output values used by other actions, add debug messages to the output logs…
The correct answer is E. workflow commands. Workflow commands are the mechanism GitHub Actions provides for steps to communicate with the runner. They are written to stdout using the ::command:: syntax (e.g., ::set-env::, ::set-output::, ::debug::, ::add-mask::). This is the only option that directly addresses all listed…
Question
As a developer, you are designing a workflow and need to communicate with the runner machine to set environment variables, output values used by other actions, add debug messages to the output logs, and other tasks. Which of the following options should you use?
Options
- Acomposite run step
- Benable debug logging
- Cself-hosted runners
- Denvironment variables
- Eworkflow commands
How the community answered
(26 responses)- B8% (2)
- C4% (1)
- E88% (23)
Explanation
Workflow commands are the mechanism GitHub Actions provides for steps to communicate with the runner. They are written to stdout using the ::command:: syntax (e.g., ::set-env::, ::set-output::, ::debug::, ::add-mask::). This is the only option that directly addresses all listed needs: setting environment variables, outputting values, and adding debug messages. The other options (composite steps, debug logging, self-hosted runners, environment variables as a concept) do not provide this communication channel.
Topics
Community Discussion
No community discussion yet for this question.