mirror of
https://github.com/dtolnay/rust-toolchain.git
synced 2025-06-07 11:16:37 +00:00
Merge 2769202264
into b3b07ba8b4
This commit is contained in:
commit
044d1319cd
1 changed files with 10 additions and 2 deletions
12
action.yml
12
action.yml
|
@ -18,6 +18,10 @@ 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
|
||||||
|
rustup-version:
|
||||||
|
description: The version of rustup used during installation
|
||||||
|
required: false
|
||||||
|
default: 1.28.2
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
cachekey:
|
cachekey:
|
||||||
|
@ -69,20 +73,24 @@ runs:
|
||||||
- run: |
|
- run: |
|
||||||
: install rustup if needed
|
: install rustup if needed
|
||||||
if ! command -v rustup &>/dev/null; then
|
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
|
echo "$CARGO_HOME/bin" >> $GITHUB_PATH
|
||||||
fi
|
fi
|
||||||
if: runner.os != 'Windows'
|
if: runner.os != 'Windows'
|
||||||
|
env:
|
||||||
|
RUSTUP_VERSION: ${{ inputs.rustup-version }}
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- run: |
|
- run: |
|
||||||
: install rustup if needed on windows
|
: install rustup if needed on windows
|
||||||
if ! command -v rustup &>/dev/null; then
|
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'
|
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
|
echo "$CARGO_HOME\bin" >> $GITHUB_PATH
|
||||||
fi
|
fi
|
||||||
if: runner.os == 'Windows'
|
if: runner.os == 'Windows'
|
||||||
|
env:
|
||||||
|
RUSTUP_VERSION: ${{ inputs.rustup-version }}
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: rustup toolchain install ${{steps.parse.outputs.toolchain}}
|
- name: rustup toolchain install ${{steps.parse.outputs.toolchain}}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue