From 0185c0604231e18106b0f6fc3bdf12e3388029e7 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 22 Aug 2025 17:57:03 -0700 Subject: [PATCH] Fix update-revs.sh to recognize only the intended `required: true` --- action.yml | 1 + scripts/update-revs.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 3bba17a..b48984a 100644 --- a/action.yml +++ b/action.yml @@ -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 diff --git a/scripts/update-revs.sh b/scripts/update-revs.sh index 697d135..1d5006e 100755 --- a/scripts/update-revs.sh +++ b/scripts/update-revs.sh @@ -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"