GitHub Actions "Failed to create step summary" (GITHUB_STEP_SUMMARY too large)
GITHUB_STEP_SUMMARY accepts Markdown up to a per-step size limit. Writing more than that (a huge table, full test output) causes the summary upload to fail.
What this error means
A step that appends a large amount of Markdown to GITHUB_STEP_SUMMARY fails the summary upload, and the job annotation reports the summary could not be created.
github-actions
Error: Failed to create step summary using 'GITHUB_STEP_SUMMARY': Caused by: The size of the step summary content exceeds the maximum allowed sizeCommon causes
Summary content over the size limit
A step dumped very large output (full logs, a massive table) into GITHUB_STEP_SUMMARY, exceeding the per-step cap.
Appending in a loop without bounds
A loop keeps appending rows to the summary with no truncation, eventually crossing the limit.
How to fix it
Trim the summary content
- Write only a concise summary; link to full output as an artifact.
- Truncate large tables to the top N rows.
- Reset the summary between steps if you rebuild it.
.github/workflows/ci.yml
- run: |
echo "## Results" >> "${GITHUB_STEP_SUMMARY}"
head -n 50 results.md >> "${GITHUB_STEP_SUMMARY}"How to prevent it
- Keep step summaries short and link bulky output to artifacts.
- Truncate generated tables to a reasonable row count.
- Avoid unbounded loops appending to the summary.
Related guides
GitHub Actions GITHUB_STEP_SUMMARY Not Showing or Too LargeFix GitHub Actions job summaries that do not render - writing to the wrong target, exceeding the per-step sum…
GitHub Actions Job Outputs Truncated or Dropped at Size LimitFix GitHub Actions job outputs that come through truncated or empty - job and step outputs have a size cap, s…
GitHub Actions "No files were found with the provided path"Fix GitHub Actions upload-artifact "No files were found with the provided path" - the path glob matched nothi…