3
0
Fork 0
mirror of https://github.com/dtolnay/rust-toolchain.git synced 2024-11-25 17:49:31 +01:00

Do the fallback from targets to target as a yaml expression

This commit is contained in:
David Tolnay 2022-07-20 14:53:46 -07:00
parent c9932df3e4
commit 404bb95f09
No known key found for this signature in database
GPG key ID: F9BA143B95FF6D82

View file

@ -30,13 +30,11 @@ runs:
- id: flags
run: |
: 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=components::$(for c in ${components//,/ }; do echo -n ' --component' $c; done)"
echo "::set-output name=downgrade::${{inputs.toolchain == 'nightly' && inputs.components && ' --allow-downgrade' || ''}}"
env:
targets: ${{inputs.targets}}
target: ${{inputs.target}}
targets: ${{inputs.targets || input.target || ''}}
components: ${{inputs.components}}
shell: bash