Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/workflow-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ jobs:
errors=0
for f in .github/workflows/*.yml .github/workflows/*.yaml; do
[ -f "$f" ] || continue
if ! head -1 "$f" | grep -q "SPDX-License-Identifier"; then
echo "ERROR: $f missing SPDX header"
if ! awk '/^[[:space:]]*(#|$)/ { if (/SPDX-License-Identifier/) found = 1; next } { exit } END { exit !found }' "$f"; then
echo "ERROR: $f missing SPDX header" >&2
errors=$((errors + 1))
fi
done
Expand All @@ -39,7 +39,7 @@ jobs:
for f in .github/workflows/*.yml .github/workflows/*.yaml; do
[ -f "$f" ] || continue
if ! grep -q "^permissions:" "$f"; then
echo "ERROR: $f missing permissions declaration"
echo "ERROR: $f missing permissions declaration" >&2
errors=$((errors + 1))
fi
done
Expand Down
Loading