From 6b014e56708c87d6eb68adb119c3657d56f9deb4 Mon Sep 17 00:00:00 2001 From: Thom Chiovoloni Date: Sat, 4 Jun 2022 15:19:25 -0700 Subject: [PATCH] Attempt to install rustup when not present --- action.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/action.yml b/action.yml index 2067242..6512b80 100644 --- a/action.yml +++ b/action.yml @@ -31,6 +31,14 @@ runs: targets: ${{inputs.target}} components: ${{inputs.components}} shell: bash + - name: "Install rustup if needed" + run: | + if ! command -v rustup &> /dev/null ; then + curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://sh.rustup.rs" | sh -s -- --default-toolchain none -y + echo "$HOME/.cargo/bin" >> $GITHUB_PATH + fi + if: runner.os != 'Windows' + shell: bash - name: rustup toolchain install ${{inputs.toolchain}} run: rustup toolchain install ${{inputs.toolchain}}${{steps.flags.outputs.targets}}${{steps.flags.outputs.components}} --profile minimal${{steps.flags.outputs.downgrade}} --no-self-update shell: bash