Update .forgejo/workflows/yamllint.yml

This commit is contained in:
Matt Reeves 2024-12-13 00:42:57 -05:00
parent 23cf4c25e7
commit 9496871d72

View file

@ -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
# 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