mirror of
https://github.com/actions-rust-lang/setup-rust-toolchain.git
synced 2025-07-04 20:41:12 +00:00
feat: install cargo packages
This commit is contained in:
parent
9d7e65c320
commit
512e2f755a
2 changed files with 12 additions and 1 deletions
|
@ -53,6 +53,7 @@ Afterward, the `components` and `target` specified via inputs are installed in a
|
||||||
| `toolchain` | Comma-separated list of Rustup toolchain specifier e.g. `stable`, `nightly`, `1.42.0`. The last version is the default. | stable |
|
| `toolchain` | Comma-separated list of Rustup toolchain specifier e.g. `stable`, `nightly`, `1.42.0`. The last version is the default. | stable |
|
||||||
| `target` | Additional target support to install e.g. `wasm32-unknown-unknown` | |
|
| `target` | Additional target support to install e.g. `wasm32-unknown-unknown` | |
|
||||||
| `components` | Comma-separated string of additional components to install e.g. `clippy, rustfmt` | |
|
| `components` | Comma-separated string of additional components to install e.g. `clippy, rustfmt` | |
|
||||||
|
| `cargo-packages` | Comma-separated string of Cargo packages to install e.g. `cargo-edit, cargo-tarpaulin` | |
|
||||||
| `cache` | Automatically configure Rust cache (using [`Swatinem/rust-cache`]) | true |
|
| `cache` | Automatically configure Rust cache (using [`Swatinem/rust-cache`]) | true |
|
||||||
| `cache-directories` | Propagates the value to [`Swatinem/rust-cache`] | |
|
| `cache-directories` | Propagates the value to [`Swatinem/rust-cache`] | |
|
||||||
| `cache-workspaces` | Propagates the value to [`Swatinem/rust-cache`] | |
|
| `cache-workspaces` | Propagates the value to [`Swatinem/rust-cache`] | |
|
||||||
|
|
10
action.yml
10
action.yml
|
@ -21,6 +21,9 @@ inputs:
|
||||||
components:
|
components:
|
||||||
description: "Comma-separated list of components to be additionally installed"
|
description: "Comma-separated list of components to be additionally installed"
|
||||||
required: false
|
required: false
|
||||||
|
cargo-packages:
|
||||||
|
description: "Comma-separated list of Cargo packages to be additionally installed"
|
||||||
|
required: false
|
||||||
cache:
|
cache:
|
||||||
description: "Automatically configure Rust cache"
|
description: "Automatically configure Rust cache"
|
||||||
required: false
|
required: false
|
||||||
|
@ -179,6 +182,13 @@ runs:
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
- name: Install additional Cargo packages
|
||||||
|
if: inputs.cargo-packages != ''
|
||||||
|
env:
|
||||||
|
packages: ${{inputs.cargo-packages}}
|
||||||
|
shell: bash
|
||||||
|
run: cargo install ${packages//,/ }
|
||||||
|
|
||||||
- id: versions
|
- id: versions
|
||||||
name: Print installed versions
|
name: Print installed versions
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue