Skip to content

Commit 9496871

Browse files
author
mafyuh
committedDec 13, 2024
Update .forgejo/workflows/yamllint.yml
1 parent 23cf4c2 commit 9496871

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed
 

‎.forgejo/workflows/yamllint.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@ jobs:
2121
2222
- name: Lint .yml files
2323
run: |
24-
lint_output=$(find docker -name "*.yml" -exec yamllint -d "{extends: relaxed, rules: {line-length: {max: 120}}}" {} \;)
24+
lint_output=$(find docker -name "*.yml" -exec yamllint --strict -d "{extends: relaxed, rules: {line-length: {max: 120}}}" {} \;)
2525
26-
# Check if there are any issues
27-
if [[ -n "$lint_output" ]]; then
28-
echo "$lint_output"
26+
# Check if there are any warnings or errors in the output
27+
echo "$lint_output"
28+
if echo "$lint_output" | grep -q -E "error|warning"; then
29+
echo "YAML linting failed due to errors or warnings."
2930
exit 1
3031
fi

0 commit comments

Comments
 (0)
Please sign in to comment.