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
1 changed files with 5 additions and 1 deletions

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