3
0
Fork 0
mirror of https://github.com/dtolnay/rust-toolchain.git synced 2024-11-22 08:49:30 +01:00

Rearrange flags generation into one step

This commit is contained in:
David Tolnay 2021-10-09 05:03:25 +01:00
parent 8fb5bc3133
commit a538c0eb3d
No known key found for this signature in database
GPG key ID: F9BA143B95FF6D82

View file

@ -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