From 8e1a49f4580151a24149046d9c04820263c2f937 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sat, 9 Oct 2021 05:09:30 +0100 Subject: [PATCH] Support multiple targets --- action.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index bc671a1..95bfa48 100644 --- a/action.yml +++ b/action.yml @@ -24,13 +24,14 @@ runs: - id: flags run: | : construct rustup command line - echo "::set-output name=target::${{inputs.target && ' --target '}}${{inputs.target}}" + echo "::set-output name=targets::$(for c in ${targets//,/ }; do echo -n ' --target' $c; done)" echo "::set-output name=components::$(for c in ${components//,/ }; do echo -n ' --component' $c; done)" env: + targets: ${{inputs.target}} components: ${{inputs.components}} shell: bash - name: rustup toolchain install ${{inputs.toolchain}} - run: rustup toolchain install ${{inputs.toolchain}}${{steps.flags.outputs.target}}${{steps.flags.outputs.components}} --profile minimal --no-self-update + run: rustup toolchain install ${{inputs.toolchain}}${{steps.flags.outputs.targets}}${{steps.flags.outputs.components}} --profile minimal --no-self-update shell: bash - run: rustup default ${{inputs.toolchain}} shell: bash