mirror of
https://github.com/dtolnay/rust-toolchain.git
synced 2024-11-14 13:36:34 +02:00
Do the fallback from targets to target as a yaml expression
This commit is contained in:
parent
c9932df3e4
commit
404bb95f09
1 changed files with 1 additions and 3 deletions
|
@ -30,13 +30,11 @@ runs:
|
||||||
- id: flags
|
- id: flags
|
||||||
run: |
|
run: |
|
||||||
: construct rustup command line
|
: construct rustup command line
|
||||||
if [[ -z "$targets" ]]; then targets=$target; fi
|
|
||||||
echo "::set-output name=targets::$(for t in ${targets//,/ }; do echo -n ' --target' $t; done)"
|
echo "::set-output name=targets::$(for t in ${targets//,/ }; do echo -n ' --target' $t; done)"
|
||||||
echo "::set-output name=components::$(for c in ${components//,/ }; do echo -n ' --component' $c; done)"
|
echo "::set-output name=components::$(for c in ${components//,/ }; do echo -n ' --component' $c; done)"
|
||||||
echo "::set-output name=downgrade::${{inputs.toolchain == 'nightly' && inputs.components && ' --allow-downgrade' || ''}}"
|
echo "::set-output name=downgrade::${{inputs.toolchain == 'nightly' && inputs.components && ' --allow-downgrade' || ''}}"
|
||||||
env:
|
env:
|
||||||
targets: ${{inputs.targets}}
|
targets: ${{inputs.targets || input.target || ''}}
|
||||||
target: ${{inputs.target}}
|
|
||||||
components: ${{inputs.components}}
|
components: ${{inputs.components}}
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue