mirror of
https://github.com/dtolnay/rust-toolchain.git
synced 2024-11-25 17:49:31 +01:00
Rearrange flags generation into one step
This commit is contained in:
parent
8fb5bc3133
commit
a538c0eb3d
1 changed files with 5 additions and 6 deletions
11
action.yml
11
action.yml
|
@ -21,16 +21,15 @@ outputs:
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
- id: target
|
- id: flags
|
||||||
run: echo "::set-output name=flag::${{inputs.target && ' --target '}}${{inputs.target}}"
|
run: |
|
||||||
shell: bash
|
echo "::set-output name=target::${{inputs.target && ' --target '}}${{inputs.target}}"
|
||||||
- id: components
|
echo "::set-output name=components::$(for c in ${components//,/ }; do echo -n ' --component' $c; done)"
|
||||||
run: echo "::set-output name=flag::$(for c in ${components//,/ }; do echo -n ' --component' $c; done)"
|
|
||||||
env:
|
env:
|
||||||
components: ${{inputs.components}}
|
components: ${{inputs.components}}
|
||||||
shell: bash
|
shell: bash
|
||||||
- name: rustup toolchain install ${{inputs.toolchain}}
|
- 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
|
shell: bash
|
||||||
- run: rustup default ${{inputs.toolchain}}
|
- run: rustup default ${{inputs.toolchain}}
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
Loading…
Reference in a new issue