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