Skip to content
Latchkey

How to Write a Step Summary in GitHub Actions

Appending Markdown to GITHUB_STEP_SUMMARY renders a rich summary panel on the run page.

Write Markdown to the $GITHUB_STEP_SUMMARY file. GitHub displays it on the job summary, no artifact needed.

Steps

  • Append Markdown lines to $GITHUB_STEP_SUMMARY.
  • Use tables and headings for readable reports.
  • Each step that appends adds to the same summary.

Workflow

.github/workflows/ci.yml
steps:
  - run: |
      {
        echo "## Test results"
        echo "| Suite | Status |"
        echo "| --- | --- |"
        echo "| unit | passed |"
        echo "| e2e  | passed |"
      } >> "$GITHUB_STEP_SUMMARY"

Gotchas

  • The summary has a size cap (about 1 MiB); trim very large output.
  • Overwrite the file with > to reset; append with >> to add.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →