From 567c2c0e296cfc9f0df5a3c6db7d790f4a094bf5 Mon Sep 17 00:00:00 2001 From: Andrew Gable Date: Tue, 12 May 2026 16:23:18 -0600 Subject: [PATCH 1/2] Fix immutable action ref parsing --- scripts/validateImmutableActionRefs.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/validateImmutableActionRefs.sh b/scripts/validateImmutableActionRefs.sh index a80f422..88c679d 100755 --- a/scripts/validateImmutableActionRefs.sh +++ b/scripts/validateImmutableActionRefs.sh @@ -24,14 +24,14 @@ fi # - action metadata files, which can be anywhere in the repo, but must be called action.yml or action.yaml ACTIONS="$(find "$REPO_ROOT" -type f \( -name "action.yml" -o -name "action.yaml" \))" if [[ -z "$ACTIONS" ]]; then - warning "No workflows found. Did you remember to run this script from the root of a repository?" >&2 + warning "No action metadata files found." >&2 fi readonly YAML_FILES="$WORKFLOWS $ACTIONS" # Find yaml files in the `.github` directory for FILE in $YAML_FILES; do - USES_LINES="$(grep "uses:" "$FILE")" + USES_LINES="$(grep -E "^[[:space:]]*-?[[:space:]]*uses:[[:space:]]+" "$FILE")" # Ignore files without external action usages if [[ -z "$USES_LINES" ]]; then From a25a523908bea571304b08daa6309d2378f622bf Mon Sep 17 00:00:00 2001 From: Andrew Gable Date: Tue, 12 May 2026 16:26:10 -0600 Subject: [PATCH 2/2] Keep immutable action warning unchanged --- scripts/validateImmutableActionRefs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/validateImmutableActionRefs.sh b/scripts/validateImmutableActionRefs.sh index 88c679d..0e1beec 100755 --- a/scripts/validateImmutableActionRefs.sh +++ b/scripts/validateImmutableActionRefs.sh @@ -24,7 +24,7 @@ fi # - action metadata files, which can be anywhere in the repo, but must be called action.yml or action.yaml ACTIONS="$(find "$REPO_ROOT" -type f \( -name "action.yml" -o -name "action.yaml" \))" if [[ -z "$ACTIONS" ]]; then - warning "No action metadata files found." >&2 + warning "No workflows found. Did you remember to run this script from the root of a repository?" >&2 fi readonly YAML_FILES="$WORKFLOWS $ACTIONS"