Which workflow command creates an annotation that appears in the GitHub Actions log and PR review?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Workflow commands use the ::command:: syntax — echo them to stdout and GitHub's runner intercepts and processes them as special instructions.
Full explanation below image
Full Explanation
GitHub Actions workflow commands are written to stdout using the format '::command::message' or '::command key=value::message'. The 'notice', 'warning', and 'error' commands create log annotations with optional file location metadata: '::notice file=filename,line=N,col=N::Message'. These annotations appear in the workflow run log, the Files Changed tab in PRs, and the workflow annotations section. Regular echo with '[WARNING]' prefix just produces text output with no special treatment. The runner intercepts lines matching the workflow command format.