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.
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.