Use the ::
syntax to run the workflow commands within your YAML file; these
commands are then sent to the runner over stdout.
Prints a debug message to the log. You must create a secret named
ACTIONS_STEP_DEBUG
with the value true to see the debug messages set by this
command in the log.
Note
Requires debug logging enabled.
::debug::{message}
run: echo "::debug::Set the Octocat variable"
Creates a notice message and prints the message to the log. This message will create an annotation, which can associate the message with a particular file in your repository. Optionally, your message can specify a position within the file.
::notice file={name},line={line},endLine={endLine},title={title}::{message}
Creates a notice message and prints the message to the log. This message will create an annotation, which can associate the message with a particular file in your repository. Optionally, your message can specify a position within the file.
run: echo "::notice file=app.js,line=1,col=5,endColumn=7::Missing semicolon"
run: echo "::notice title=Heads up::I need to make you aware of something"
run: echo "::notice title=✓ Test passed::Have a great rest of the day/night!"
Creates a warning message and prints the message to the log. This message will create an annotation, which can associate the message with a particular file in your repository. Optionally, your message can specify a position within the file.
::warning file={name},line={line},endLine={endLine},title={title}::{message}
run: echo "::warning file=app.js,line=1,col=5,endColumn=7::Missing semicolon"
run: echo "::warning title=Oops::Something didn't go quite as expected"
Creates an error message and prints the message to the log. This message will create an annotation, which can associate the message with a particular file in your repository. Optionally, your message can specify a position within the file.
::error file={name},line={line},endLine={endLine},title={title}::{message}
run: echo "::error file=app.js,line=1,col=5,endColumn=7::Missing semicolon"
run: echo "::error title=Uh oh::Something failed. Here are some steps to correct the problem."
run: echo "::error title=✘ Test failed::You probably want to fix this."
- title: GitHub workflow commands for message output
- subtitle: Examples of writing GitHub workflow messages to stdout.
- date: May 21, 2024
- source: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions
- snippet: https://jonlabelle.com/snippets/view/markdown/github-workflow-commands-for-message-output
- gist: https://gist.github.com/jonlabelle/69c79a59c69d2f0bff6dda9348f3fa2d