Skip to content

Commit

Permalink
Improved the example of Setting an Environment Var (#2488)
Browse files Browse the repository at this point in the history
Co-authored-by: Sarah Edwards <[email protected]>
  • Loading branch information
espipj and skedwards88 authored Jan 29, 2021
1 parent 794b40f commit a4d1c8b
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions content/actions/reference/workflow-commands-for-github-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,11 +268,19 @@ Creates or updates an environment variable for any actions running next in a job

#### Example

```bash
echo "action_state=yellow" >> $GITHUB_ENV
{% raw %}
```

Running `$action_state` in a future step will now return `yellow`
steps:
- name: Set the value
id: step_one
run: |
echo "action_state=yellow" >> $GITHUB_ENV
- name: Use the value
id: step_two
run: |
echo "${{ env.action_state }}" # This will output 'yellow'
```
{% endraw %}
#### Multiline strings
Expand Down

0 comments on commit a4d1c8b

Please sign in to comment.