From 9496871d72afc7b3dccea1fd54f683db572c6695 Mon Sep 17 00:00:00 2001 From: mafyuh Date: Fri, 13 Dec 2024 00:42:57 -0500 Subject: [PATCH] Update .forgejo/workflows/yamllint.yml --- .forgejo/workflows/yamllint.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.forgejo/workflows/yamllint.yml b/.forgejo/workflows/yamllint.yml index 07c97c7..42a2a5b 100644 --- a/.forgejo/workflows/yamllint.yml +++ b/.forgejo/workflows/yamllint.yml @@ -21,10 +21,11 @@ jobs: - name: Lint .yml files run: | - lint_output=$(find docker -name "*.yml" -exec yamllint -d "{extends: relaxed, rules: {line-length: {max: 120}}}" {} \;) + lint_output=$(find docker -name "*.yml" -exec yamllint --strict -d "{extends: relaxed, rules: {line-length: {max: 120}}}" {} \;) - # Check if there are any issues - if [[ -n "$lint_output" ]]; then - echo "$lint_output" + # Check if there are any warnings or errors in the output + echo "$lint_output" + if echo "$lint_output" | grep -q -E "error|warning"; then + echo "YAML linting failed due to errors or warnings." exit 1 fi