From 123acc0c06010ad75fddd25f3638a0705d535351 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sat, 9 Oct 2021 04:37:46 +0100 Subject: [PATCH] Extract target and component flag generation to steps --- action.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index a601eac..49264a9 100644 --- a/action.yml +++ b/action.yml @@ -21,8 +21,14 @@ 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::${{inputs.components && ' --component '}}${{inputs.components}}" + shell: bash - name: rustup toolchain install ${{inputs.toolchain}} - run: rustup toolchain install ${{inputs.toolchain}}${{inputs.target && format(' --target {0}', inputs.target)}}${{inputs.components && format(' --component {0}', inputs.components)}} --profile minimal --no-self-update + run: rustup toolchain install ${{inputs.toolchain}}${{steps.target.outputs.flag}}${{steps.components.outputs.flag}} --profile minimal --no-self-update shell: bash - run: rustup default ${{inputs.toolchain}} shell: bash