Mark a step error with file context.
Section: Debug logging and log structure
Emit an error annotation
bash
bash
echo "::error file=src/app.js,line=42::Build failed"Explanation
Useful when custom scripts want to surface failures in a GitHub-native way.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Debug logging and log structure
Write a markdown step summary
Add a rich markdown summary to the workflow run.
Inspect the raw event payload
Dump the event JSON file path or contents for debugging.