Remove toolchain input when toolchain is specified in action rev

This commit is contained in:
David Tolnay 2024-04-14 12:01:00 -07:00
parent 56909e6633
commit bb45937a05
No known key found for this signature in database
GPG key ID: F9BA143B95FF6D82

View file

@ -29,7 +29,11 @@ for rev in `releases` stable beta nightly; do
echo "Updating $rev branch"
git checkout --quiet "$base"
git branch --quiet --delete --force $rev &>/dev/null || true
sed -i "s/required: true/required: false\n default: $rev/" action.yml
if [[ $rev == 1* ]]; then
sed -i "/^ toolchain:/,+2d; s/\${{inputs\.toolchain}}/$rev/" action.yml
else
sed -i "s/required: true/required: false\n default: $rev/" action.yml
fi
git add action.yml
git commit --quiet --message "toolchain: $rev"
git checkout --quiet -b $rev