nerdexam
Microsoft

GH-200 · Question #15

Which workflow commands send information from the runner? (Each correct answer presents a complete solution. Choose two.)

The correct answer is B. setting a debug message D. setting output parameters. [B] Setting a debug message Prints a debug message to the log. You must create a secret named ACTIONS_STEP_DEBUG with the value true to see the debug messages set by this command in the log. ::debug::{message} Example: Setting a debug message echo "::debug::Set the Octocat variab

Author and Maintain Workflows

Question

Which workflow commands send information from the runner? (Each correct answer presents a complete solution. Choose two.)

Options

  • Areading from environment variables
  • Bsetting a debug message
  • Cpopulating variables in a Dockerfile
  • Dsetting output parameters

How the community answered

(33 responses)
  • A
    9% (3)
  • B
    88% (29)
  • C
    3% (1)

Explanation

[B] Setting a debug message Prints a debug message to the log. You must create a secret named ACTIONS_STEP_DEBUG with the value true to see the debug messages set by this command in the log. ::debug::{message} Example: Setting a debug message echo "::debug::Set the Octocat variable" [D] Setting an output parameter Sets a step's output parameter. Note that the step will need an id to be defined to later retrieve the output value. echo "{name}={value}" >> "$GITHUB_OUTPUT" Example of setting an output parameter This example demonstrates how to set the SELECTED_COLOR output parameter and later - name: Set color id: color-selector run: echo "SELECTED_COLOR=green" >> "$GITHUB_OUTPUT" - name: Get color SELECTED_COLOR: ${{ steps.color-selector.outputs.SELECTED_COLOR }} run: echo "The selected color is $SELECTED_COLOR" https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-commands

Topics

#GitHub Actions#Workflow commands#Runner communication#Output parameters

Community Discussion

No community discussion yet for this question.

Full GH-200 Practice