From 3960ebf2f6d845d47da3ad65925cb834aa1110e6 Mon Sep 17 00:00:00 2001 From: Rob Cowsill <42620235+rcowsill@users.noreply.github.com> Date: Tue, 7 Sep 2021 16:08:53 +0100 Subject: [PATCH] Add documentation for "notice" command The core.notice toolkit command is documented, but the equivalent workflow command was not covered on this page. --- .../workflow-commands-for-github-actions.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/content/actions/reference/workflow-commands-for-github-actions.md b/content/actions/reference/workflow-commands-for-github-actions.md index 53eda7e544..b05af3ee7c 100644 --- a/content/actions/reference/workflow-commands-for-github-actions.md +++ b/content/actions/reference/workflow-commands-for-github-actions.md @@ -77,6 +77,7 @@ The following table shows which toolkit functions are available within a workflo | `core.getInput` | Accessible using environment variable `INPUT_{NAME}` | | `core.getState` | Accessible using environment variable `STATE_{NAME}` | | `core.isDebug` | Accessible using environment variable `RUNNER_DEBUG` | +| `core.notice` | `notice` | | `core.saveState` | `save-state` | | `core.setFailed` | Used as a shortcut for `::error` and `exit 1` | | `core.setOutput` | `set-output` | @@ -138,6 +139,18 @@ Prints a debug message to the log. You must create a secret named `ACTIONS_STEP_ echo "::debug::Set the Octocat variable" ``` +## Setting a notice message + +`::notice file={name},line={line},col={col}::{message}` + +Creates a notice message and prints the message to the log. You can optionally provide a filename (`file`), line number (`line`), and column number (`col`) where the notice occurred. Line and column numbers start at 1. + +### Example + +``` bash +echo "::notice file=app.js,line=1,col=5::Spelling mistake in string" +``` + ## Setting a warning message `::warning file={name},line={line},col={col}::{message}`