mirror of
https://github.com/dtolnay/rust-toolchain.git
synced 2024-11-22 08:49:30 +01:00
Extract target and component flag generation to steps
This commit is contained in:
parent
58522575e4
commit
123acc0c06
1 changed files with 7 additions and 1 deletions
|
@ -21,8 +21,14 @@ outputs:
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
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}}
|
- 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
|
shell: bash
|
||||||
- run: rustup default ${{inputs.toolchain}}
|
- run: rustup default ${{inputs.toolchain}}
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
Loading…
Reference in a new issue