Skip to content

Commit be4332e

Browse files
committed
add a section on set-env and add-path commands
1 parent ab44d50 commit be4332e

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,16 @@ jobs:
5757
[...]
5858
```
5959

60+
#### How do I set environent variables at run-time?
61+
62+
You can use [workflow commands](https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions)
63+
to set environment variables, add an element to `$PATH`, and more. For example:
64+
65+
```yaml
66+
echo "::set-env name=CGO_ENABLED::0"
67+
echo "::add-path::${HOME}/goroot/bin"
68+
```
69+
6070
#### How do I set up caching between builds?
6171

6272
Use [actions/cache](https://github.com/actions/cache). For example, to cache
@@ -84,8 +94,8 @@ language](https://docs.github.com/en/actions/reference/context-and-expression-sy
8494

8595
#### How do I set up a custom build matrix?
8696

87-
You can [add options to existing matrix
88-
jobs](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#example-including-configurations-in-a-matrix-build),
97+
You can [include matrix
98+
jobs](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#example-including-new-combinations),
8999
and you can [exclude specific matrix
90100
jobs](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#example-excluding-configurations-from-a-matrix).
91101

0 commit comments

Comments
 (0)