mirror of
https://github.com/dtolnay/rust-toolchain.git
synced 2024-12-22 15:45:50 +02: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:
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue