GH-200 - Author and manage workflows (25% of the exam) - Section 1.8

Produce job summaries with GITHUB_STEP_SUMMARY, add workflow status badges and environment protections, and reuse YAML with anchors and aliases.

Write structured Markdown to GITHUB_STEP_SUMMARY to produce per-run job summaries, and embed workflow status badges in repository documentation. Configure environment protections and reuse repeated YAML blocks with anchors and aliases.

GITHUB_STEP_SUMMARYstatus badgesenvironment protectionsYAML anchors

Practice question for this objective

Free sampleAuthor and manage workflowsmedium

A workflow step computes a Markdown test report and must publish it on the run's summary page so reviewers see a formatted table without opening the raw log. The step writes the Markdown by appending it to a file path exposed through an environment variable. Which variable should the step append the Markdown to?

steps:
  - name: Publish report
    run: echo "## Results" >> "$<VARIABLE>"
  • AAppend it to GITHUB_OUTPUT, because Markdown written to that file is rendered on the run summary page once the step finishes.
  • BAppend it to GITHUB_ENV, because values written to that file are collected and displayed as the formatted summary for the run.
  • CAppend it to GITHUB_STEP_SUMMARY, because Markdown written to that file path is rendered on the run summary page for the job. Correct
  • DAppend it to GITHUB_PATH, because content added to that file is collected by the runner and shown as the job summary report.
Write Markdown to the GITHUB_STEP_SUMMARY file to render a formatted job summary on the run page. GitHub Actions watches the file referenced by the GITHUB_STEP_SUMMARY environment variable, and any Markdown appended to it is rendered on the workflow run summary page for that job. The other runner files serve different purposes: GITHUB_OUTPUT records step outputs, GITHUB_ENV sets environment variables, and GITHUB_PATH adds entries to the PATH, so none of them produce a rendered summary.

Why A is wrong: Tempting because GITHUB_OUTPUT is also an appended file, but it stores key-value step outputs for later steps to read and does not render Markdown on the run summary page.

Why B is wrong: Tempting because GITHUB_ENV is an appended file too, but it sets environment variables for later steps in the job and never produces Markdown on the run summary page.

Why C is correct: Markdown appended to the file at GITHUB_STEP_SUMMARY is rendered on the run summary page for the job, giving reviewers a formatted table without reading raw logs.

Why D is wrong: Tempting because GITHUB_PATH is also a runner file you append to, but it prepends directories to the system PATH for later steps and renders nothing on the summary page.

See more GH-200 practice questions, answers explained.

Exam traps in Author and manage workflows

Answers that look right on this material and are not. Each one is a distractor from a different question in the GH-200 bank for this domain.

  • Anchors and aliases can be reused across separate workflow files in the repository, because GitHub resolves anchors globally before each workflow file is parsed.

    Why it is wrong: Tempting because reuse across files sounds efficient, but YAML anchors are scoped to a single document. An alias cannot reference an anchor defined in a different workflow file.

  • Only the final step's content survives, because each step that writes to GITHUB_STEP_SUMMARY replaces the file written by earlier steps before the summary is rendered.

    Why it is wrong: Steps append to their own summary files rather than overwriting a shared one, so this wrongly assumes a last-writer-wins overwrite that does not occur across steps.

  • Only the first heading is kept because the summary file is read-only after the first write, so clearing it later is impossible within the same job.

    Why it is wrong: Tempting because summaries feel immutable, but the file is writable throughout the job and later steps can append more or truncate it, so the first write is not the only content kept.

Examworthy is not affiliated with or endorsed by GitHub. Original, blueprint-aligned practice material only.