1
0
mirror of synced 2025-12-21 10:57:10 -05:00

Update workflow-commands-for-github-actions.md

This commit is contained in:
Jesse Houwing
2022-03-11 14:06:03 +01:00
committed by GitHub
parent 1b9ee3b6d7
commit 3d1de14fc6

View File

@@ -429,6 +429,7 @@ jobs:
{% endraw %}
{% endpowershell %}
## Echoing command outputs
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}`.
@@ -491,8 +492,6 @@ The example above prints the following lines to the log:
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.
## Sending values to the pre and post actions
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.