Skip to content

Commit 0578bf5

Browse files
committed
ci: fix workflow-linter YAML parse error + self-flag bug
Combined fix: 1. The 'Add permissions...' multi-line echo on the old version had a YAML literal-block indentation bug that crashed the workflow file parser ('This run likely failed because of a workflow file issue'). Collapsed to a single-line echo. 2. The action-pinning grep matched its own source line in the workflow ('grep -rn "uses:"' contains 'uses:'). Anchored to '^[[:space:]]+uses:' so it only matches workflow `uses:` lines. Together these two changes restore workflow-linter from a permanent failure state across the estate.
1 parent 8e2c74a commit 0578bf5

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

.github/workflows/workflow-linter.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ jobs:
5454
fi
5555
done
5656
if [ $failed -eq 1 ]; then
57-
echo "Add 'permissions:
58-
contents: read' at workflow level"
57+
echo "Add a top-level 'permissions:' block (e.g. {contents: read})"
5958
exit 1
6059
fi
6160
echo "All workflows have permissions declared"

0 commit comments

Comments
 (0)