From a538c0eb3dc5b8e1f58218642771612bfd7203e7 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sat, 9 Oct 2021 05:03:25 +0100 Subject: [PATCH] Rearrange flags generation into one step --- action.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/action.yml b/action.yml index 9a00d93..da00e94 100644 --- a/action.yml +++ b/action.yml @@ -21,16 +21,15 @@ outputs: runs: using: composite steps: - - id: target - run: echo "::set-output name=flag::${{inputs.target && ' --target '}}${{inputs.target}}" - shell: bash - - id: components - run: echo "::set-output name=flag::$(for c in ${components//,/ }; do echo -n ' --component' $c; done)" + - id: flags + run: | + echo "::set-output name=target::${{inputs.target && ' --target '}}${{inputs.target}}" + echo "::set-output name=components::$(for c in ${components//,/ }; do echo -n ' --component' $c; done)" env: components: ${{inputs.components}} shell: bash - name: rustup toolchain install ${{inputs.toolchain}} - run: rustup toolchain install ${{inputs.toolchain}}${{steps.target.outputs.flag}}${{steps.components.outputs.flag}} --profile minimal --no-self-update + run: rustup toolchain install ${{inputs.toolchain}}${{steps.flags.outputs.target}}${{steps.flags.outputs.components}} --profile minimal --no-self-update shell: bash - run: rustup default ${{inputs.toolchain}} shell: bash