Interview Prep/CI/CD/GitHub Actions

How do you use `GITHUB_STEP_SUMMARY`, annotations and workflow commands?

IntermediateConceptGitHub Actions
Answer

Appending Markdown to $GITHUB_STEP_SUMMARY renders a summary on the run page. Workflow commands written to stdout create annotations and control logging: ::error file=app.js,line=10::message, ::warning::, ::group::name and ::endgroup::, and ::add-mask::value to mask a value in logs.

echo "### Test results" >> "$GITHUB_STEP_SUMMARY"
echo "Passed: 482  Failed: 0" >> "$GITHUB_STEP_SUMMARY"
echo "::warning file=src/db.js,line=42::Deprecated API"
All CI/CD questions

More on GitHub Actions