diff --git a/action.yml b/action.yml index c68a596..2b57d9c 100644 --- a/action.yml +++ b/action.yml @@ -18,6 +18,10 @@ inputs: components: description: Comma-separated list of components to be additionally installed required: false + rustup-version: + description: The version of rustup used during installation + required: false + default: 1.28.2 outputs: cachekey: @@ -69,20 +73,24 @@ runs: - run: | : install rustup if needed if ! command -v rustup &>/dev/null; then - curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail https://sh.rustup.rs | sh -s -- --default-toolchain none -y + curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail https://sh.rustup.rs | RUSTUP_VERSION="$RUSTUP_VERSION" sh -s -- --default-toolchain none -y echo "$CARGO_HOME/bin" >> $GITHUB_PATH fi if: runner.os != 'Windows' + env: + RUSTUP_VERSION: ${{ inputs.rustup-version }} shell: bash - run: | : install rustup if needed on windows if ! command -v rustup &>/dev/null; then curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail https://win.rustup.rs/${{runner.arch == 'ARM64' && 'aarch64' || 'x86_64'}} --output '${{runner.temp}}\rustup-init.exe' - '${{runner.temp}}\rustup-init.exe' --default-toolchain none --no-modify-path -y + RUSTUP_VERSION="$RUSTUP_VERSION" '${{runner.temp}}\rustup-init.exe' --default-toolchain none --no-modify-path -y echo "$CARGO_HOME\bin" >> $GITHUB_PATH fi if: runner.os == 'Windows' + env: + RUSTUP_VERSION: ${{ inputs.rustup-version }} shell: bash - name: rustup toolchain install ${{steps.parse.outputs.toolchain}}