Add support for specifying toolchain profile
This commit is contained in:
parent
1c10d9b9ac
commit
88ee6c71a6
@ -8,6 +8,9 @@ inputs:
|
||||
rust-version:
|
||||
description: The toolchain version; such as stable, nightly, or 1.8.0
|
||||
default: stable
|
||||
profile:
|
||||
description: The toolchain profile to install
|
||||
default: default
|
||||
components:
|
||||
description: The toolchain components to install, comma-separated
|
||||
default: ""
|
||||
@ -22,5 +25,6 @@ runs:
|
||||
shell: bash
|
||||
env:
|
||||
INPUT_RUST_VERSION: ${{ inputs.rust-version }}
|
||||
INPUT_PROFILE: ${{ inputs.profile }}
|
||||
INPUT_COMPONENTS: ${{ inputs.components }}
|
||||
INPUT_TARGETS: ${{ inputs.targets }}
|
||||
|
2
setup.sh
2
setup.sh
@ -12,7 +12,7 @@ args=()
|
||||
# shellcheck disable=SC2206
|
||||
[[ -n "${INPUT_TARGETS}" ]] && args+=(-t "${INPUT_TARGETS// /}")
|
||||
|
||||
rustup toolchain install "${INPUT_RUST_VERSION}" "${args[@]}"
|
||||
rustup toolchain install "${INPUT_RUST_VERSION}" --profile "${INPUT_PROFILE}" "${args[@]}"
|
||||
rustup default "${INPUT_RUST_VERSION}"
|
||||
|
||||
# shellcheck disable=SC2129
|
||||
|
Loading…
Reference in New Issue
Block a user