GitHub Actions multiline output to GITHUB_OUTPUT without a delimiter
Step outputs go to the GITHUB_OUTPUT file one entry per line. A multiline value written as "name=value" breaks the parser; multiline outputs need the heredoc delimiter form.
What this error means
A step that sets a multiline output fails with an invalid-format error, or downstream steps see an empty or truncated output.
github-actions
Error: Unable to process file command 'output' successfully.
Error: Invalid format 'line 2 of changelog'Common causes
NAME=value used for multiline content
A value spanning multiple lines was written with "echo name=$value >> GITHUB_OUTPUT", which only supports single-line values.
How to fix it
Write the output with a heredoc delimiter
- Use NAME<<DELIM ... DELIM to write multiline outputs.
- Reference the output later via steps.<id>.outputs.<name>.
- Re-run.
.github/workflows/ci.yml
- id: notes
run: |
{
echo 'changelog<<EOF'
git log --oneline -n 5
echo 'EOF'
} >> "${GITHUB_OUTPUT}"
- run: echo "${{ steps.notes.outputs.changelog }}"How to prevent it
- Use the heredoc form for any output that can be multiline.
- Give each multiline output a unique delimiter to avoid collisions.
Related guides
GitHub Actions "set-output command is deprecated and disabled"Fix the GitHub Actions error where the legacy "::set-output::" workflow command no longer sets step outputs a…
GitHub Actions env var with a newline breaks GITHUB_ENV parsingFix the GitHub Actions error where writing a multiline value to GITHUB_ENV with a single-line syntax corrupts…
GitHub Actions needs context outputs are undefinedFix the GitHub Actions error where a downstream job reads needs.<job>.outputs.<name> and gets undefined becau…