Centralize references to inputs.toolchain to a single spot

This commit is contained in:
David Tolnay 2024-04-14 11:33:35 -07:00
parent 9a6ad42c5a
commit 56909e6633
No known key found for this signature in database
GPG key ID: F9BA143B95FF6D82

View file

@ -53,7 +53,7 @@ runs:
: construct rustup command line
echo "targets=$(for t in ${targets//,/ }; do echo -n ' --target' $t; done)" >> $GITHUB_OUTPUT
echo "components=$(for c in ${components//,/ }; do echo -n ' --component' $c; done)" >> $GITHUB_OUTPUT
echo "downgrade=${{inputs.toolchain == 'nightly' && inputs.components && ' --allow-downgrade' || ''}}" >> $GITHUB_OUTPUT
echo "downgrade=${{steps.parse.outputs.toolchain == 'nightly' && inputs.components && ' --allow-downgrade' || ''}}" >> $GITHUB_OUTPUT
env:
targets: ${{inputs.targets || inputs.target || ''}}
components: ${{inputs.components}}