GitHub Actions: Error: Unable to process file command 'output' successfully. Invalid format 'x'
A line written to $GITHUB_OUTPUT, $GITHUB_ENV or $GITHUB_STATE is not in name=value form — usually a multi-line value without a delimiter.
Unable to process file command 'output' successfullyUnable to process file command 'env' successfullyInvalid formatInvalid environment variable formatUnable to process file command 'state' successfully Meaning
These files accept NAME=value for single lines and NAME<<DELIMITER … DELIMITER for multi-line values. A value that contains a newline (a file's content, JSON, a commit message) breaks the format. Use a heredoc delimiter, or encode the value.
Common causes
- Multi-line value written as a single
name=valueline - Value containing a newline from
$(cat file)or command output - Missing
=between name and value - Delimiter text appearing inside the value
- Windows line endings in the written text
⚡ Quick fix
- Use the delimiter syntax:
name<<EOF…EOF - Write JSON in one line (
jq -c) - Use a random delimiter when the value could contain
EOF
Detailed fix by platform
GitHub Actions
{ echo "notes<<$EOF"; cat notes.md; echo "$EOF"; } >> "$GITHUB_OUTPUT"afterEOF=$(openssl rand -hex 8)
Code examples
Multi-line output
- id: notes
run: |
EOF=$(openssl rand -hex 8)
{
echo "body<<$EOF"
git log -5 --pretty=format:'%s'
echo
echo "$EOF"
} >> "$GITHUB_OUTPUT"
- run: echo "${{ steps.notes.outputs.body }}"How to diagnose
- File — output, env or state?
- Value — Contains newlines?
- Syntax — name=value or heredoc?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- API rate limit exceeded GitHub Actions: HttpError: API rate limit exceeded for installation ID 123456 / secondary rate limit
- Cache not found / Unable to reserve cache GitHub Actions: Cache not found for input keys: npm-Linux-abc123 / Failed to save: Unable to reserve cache with key, another job may be creating this cache
- Credentials could not be loaded GitHub Actions: Error: Credentials could not be loaded, please check your action inputs: Could not load credentials from any providers
Most viewed in CI/CD
- The process '/usr/bin/git' failed with exit code 128 GitHub Actions: Error: The process '/usr/bin/git' failed with exit code 128
- This job is stuck because you don't have any active runners GitLab CI: This job is stuck because you don't have any active runners online or available with any of these tags assigned to them
- Resource not accessible by integration GitHub Actions: Error: Resource not accessible by integration (403)
Other ways to find it
Where this error sits
Origin: Build & delivery. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 25 Oct 2026