Skip to content

Commit 67b2637

Browse files
committed
Document setting the env key when using this action
This addresses #36.
1 parent cd04d1a commit 67b2637

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,20 @@ This action takes the following parameters:
8383
| `use-rust-cache` | boolean | no | Whether or not to use [the `Swatinem/rust-cache@v2` action](https://github.com/Swatinem/rust-cache). This defaults to true. |
8484
| `rust-cache-parameters` | string (containing JSON) | no | This must be a string containing valid JSON. The JSON should be an object where the keys are the parameters for [the `Swatinem/rust-cache@v2` action](https://github.com/Swatinem/rust-cache). |
8585

86+
### Setting Environment Variables
87+
88+
You can simply set an `env` key in the workflow step that uses this action, for example:
89+
90+
```
91+
- name: Run build command
92+
uses: houseabsolute/actions-rust-cross@v1
93+
env:
94+
CARGO_LOG: debug
95+
RUSTFLAGS: "-g"
96+
with:
97+
command: build
98+
```
99+
86100
## How it Works
87101

88102
Under the hood, this action will compile your binaries with either `cargo` or `cross`, depending on

0 commit comments

Comments
 (0)