customizing filter

This commit is contained in:
2026-01-21 08:37:29 +00:00
parent b2d96b4ad7
commit 13366c2c6b

View File

@ -22,7 +22,23 @@ jobs:
sudo apt-get update
sudo apt-get install -y yamllint
- name: Run yamllint
# Lint all YAML/YML files in the repo
- name: Run yamllint on changed YAML files
run: |
yamllint .
set -e
# Fetch base branch so git diff works in PRs
git fetch origin "${{ gitea.base_ref }}"
# Get changed YAML files
files=$(git diff --name-only origin/${{ gitea.base_ref }}...HEAD \
| grep -E '\.(yml|yaml)$' || true)
if [ -z "$files" ]; then
echo "✅ No YAML files changed"
exit 0
fi
echo "🔍 Linting changed files:"
echo "$files"
yamllint -f parsable $files