Skip to content

Commit dccd754

Browse files
authored
Wording edits
1 parent 0ac9a27 commit dccd754

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

content/actions/learn-github-actions/workflow-commands-for-github-actions.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -254,13 +254,13 @@ jobs:
254254
::echo::off
255255
```
256256

257-
The `echo` command lets you enable or disable echoing of workflow commands. For example, if you use the `set-output` command in a workflow, it sets an output parameter but the workflow run log does not show the command itself. If you enable command echoing, then the log shows the command output, like `::set-output name={name}::{value}`.
257+
Enables or disables echoing of workflow commands. For example, if you use the `set-output` command in a workflow, it sets an output parameter but the workflow run's log does not show the command itself. If you enable command echoing, then the log shows the command, such as `::set-output name={name}::{value}`.
258258

259-
Command echoing is disabled by default. A workflow command is echoed if any error occurs processing the command, however.
259+
Command echoing is disabled by default. However, a workflow command is echoed if there are any error occurs processing the command.
260260

261-
You can enable command echoing globally by turning on step debug logging (`ACTIONS_STEP_DEBUG` secret). For more information, see "[Enabling debug logging](/actions/managing-workflow-runs/enabling-debug-logging)". In contrast, the `echo` command lets you enable command echoing more granular.
261+
The `add-mask`, `debug`, `warning`, and `error` commands do not support echoing because their outputs are already echoed to the log.
262262

263-
The commands `debug`, `notice`, `warning`, and `error` do not support echoing because they print messages to the log anyway.
263+
You can also enable command echoing globally by turning on step debug logging using the `ACTIONS_STEP_DEBUG` secret. For more information, see "[Enabling debug logging](/actions/managing-workflow-runs/enabling-debug-logging)". In contrast, the `echo` workflow command lets you enable command echoing at a more granular level, rather than enabling it for every workflow in a repository.
264264

265265
### Example toggling command echoing
266266

@@ -278,13 +278,15 @@ jobs:
278278
echo '::set-output name=action_echo::disabled'
279279
```
280280
281-
Turns command echoing on and off and sets an output parameter in both states. Only the second `set-output` and `echo` commands will show in the log because command echoing is enabled when they are run. Command echoing is disabled when all other commands are run and they are thus not printed. The output parameter is set in all cases.
281+
The step above prints the following lines to the log:
282282
283283
```
284284
::set-output name=action_echo::enabled
285285
::echo::off
286286
```
287287

288+
Only the second `set-output` and `echo` workflow commands are included in the log because command echoing was only enabled when they were run. Even though it is not always echoed, the output parameter is set in all cases.
289+
288290
## Sending values to the pre and post actions
289291

290292
You can use the `save-state` command to create environment variables for sharing with your workflow's `pre:` or `post:` actions. For example, you can create a file with the `pre:` action, pass the file location to the `main:` action, and then use the `post:` action to delete the file. Alternatively, you could create a file with the `main:` action, pass the file location to the `post:` action, and also use the `post:` action to delete the file.

0 commit comments

Comments
 (0)