Video Thumbnail for Lesson
6.6: Workflow Commands and Runner State

Workflow commands and runner state

Workflow commands are the strings that influence the runner (e.g., ::error::, ::notice::, writing to $GITHUB_OUTPUT, etc.). When authoring JavaScript/TypeScript actions, you can use ergonomic wrappers such as core.error() and core.setOutput(). In Bash or other languages you must emit the raw strings yourself:

Documentation: https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-commands

Equivalent ways to surface an error annotation:

# JavaScript/Typescript
core.error('missing semicolon', {file: 'app.js', startLine: 12})
# bash
echo '::error file=app.js,line=12::missing semicolon'

Other commonly used commands include:

  • ::group:: / ::endgroup:: to collapse log sections.
  • ::debug::message to surface debug logs when ACTIONS_STEP_DEBUG is enabled.
  • Writing key-value pairs to the paths stored in the GITHUB_ENV, GITHUB_OUTPUT, or GITHUB_STATE environment variables.

Understanding these primitives is essential when you need to communicate between steps, fail gracefully, or annotate build output.