mirror of
https://github.com/dtolnay/rust-toolchain.git
synced 2025-09-03 23:01:59 +03:00
Fix update-revs.sh to recognize only the intended required: true
This commit is contained in:
parent
350b8170d6
commit
0185c06042
2 changed files with 2 additions and 1 deletions
|
@ -34,6 +34,7 @@ runs:
|
|||
run: |
|
||||
: parse toolchain version
|
||||
if [[ -z $toolchain ]]; then
|
||||
# GitHub does not enforce `required: true` inputs itself. https://github.com/actions/runner/issues/1070
|
||||
echo "'toolchain' is a required input" >&2
|
||||
exit 1
|
||||
elif [[ $toolchain =~ ^stable' '[0-9]+' '(year|month|week|day)s?' 'ago$ ]]; then
|
||||
|
|
|
@ -33,7 +33,7 @@ for rev in `releases` stable beta nightly; do
|
|||
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
|
||||
sed -i "s/^ required: true$/ required: false\n default: $rev/" action.yml
|
||||
fi
|
||||
git add action.yml
|
||||
git commit --quiet --message "toolchain: $rev"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue