Skip to content

Merge pull request #55 from kartoza/lindie #4

Merge pull request #55 from kartoza/lindie

Merge pull request #55 from kartoza/lindie #4

Workflow file for this run

name: 🗜️ Yaml Checks
on:
pull_request:
push:
branches: [main, master]
jobs:
yamllint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pip install yamllint
- run: yamllint .
yamlfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install yamlfmt
run: sudo snap install yamlfmt
- name: Run yamlfmt
run: |
find . -name '*.yaml' -o -name '*.yml' | while read -r f; do
# Skip empty files
if [ ! -s "$f" ]; then
echo "🦘 Skipping empty file: $f"
continue
fi
# Skip files with only whitespace/comments
if ! grep -q '[^[:space:]#]' "$f"; then
echo "🦘 Skipping file containing only whitespace or comments: $f"
continue
fi
echo "⚒️ Formatting yaml file: $f"
yamlfmt "$f"
done