3
0
Fork 0
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:
David Tolnay 2021-10-09 04:37:46 +01:00
parent 58522575e4
commit 123acc0c06
No known key found for this signature in database
GPG key ID: F9BA143B95FF6D82

View file

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