Skip to content

Commit

Permalink
Add some more details to the docs about environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
mokurin000 authored and autarch committed Jan 20, 2025
1 parent 02bec77 commit 5b5d0b5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ This action takes the following parameters:

### Setting Environment Variables

You can simply set an `env` key in the workflow step that uses this action, for example:
By default, `cross` passes most rust-related environment variables through when it runs `cargo` in a
Docker image. This means you can simply set an `env` key in the workflow step that uses this action.

```
- name: Run build command
Expand All @@ -96,6 +97,11 @@ You can simply set an `env` key in the workflow step that uses this action, for
command: build
```
If you want to pass other environment variables through, you will need to configure `cross` to do
see. See the
[`cross` docs](https://github.com/cross-rs/cross/blob/main/docs/environment_variables.md#environment-variable-passthrough)
for more details.
## How it Works
Under the hood, this action will compile your binaries with either `cargo` or `cross`, depending on
Expand Down

0 comments on commit 5b5d0b5

Please sign in to comment.