Update validate_yamllint.yml

This commit is contained in:
Edward Firmo
2024-01-15 01:06:39 +01:00
committed by GitHub
parent 7ed8bd60a4
commit 9d6285633c

View File

@@ -1,24 +1,15 @@
--- ---
name: Validate YAML (secondary files) name: Validate YAML (secondary files)
# yamllint disable-line rule:truthy
on: on:
push: push:
paths: paths:
- '**/*.yml' - '**/*.yml'
- '**/*.yaml' - '**/*.yaml'
paths-ignore:
- "nspanel_esphome*.yaml"
- "advanced/esphome/nspanel_esphome*.yaml"
- "nspanel_blueprint.yaml"
pull_request: pull_request:
paths: paths:
- '**/*.yml' - '**/*.yml'
- '**/*.yaml' - '**/*.yaml'
paths-ignore:
- "nspanel_esphome*.yaml"
- "advanced/esphome/nspanel_esphome*.yaml"
- "nspanel_blueprint.yaml"
workflow_dispatch: workflow_dispatch:
jobs: jobs:
@@ -41,8 +32,13 @@ jobs:
run: | run: |
IFS=',' read -ra FILES <<< "${{ steps.changed-files.outputs.all_changed_files }}" IFS=',' read -ra FILES <<< "${{ steps.changed-files.outputs.all_changed_files }}"
for file in "${FILES[@]}"; do for file in "${FILES[@]}"; do
if [[ "$file" =~ ^nspanel_esphome.*\.yaml$ ]] || [[ "$file" =~ ^advanced/esphome/nspanel_esphome.*\.yaml$ ]] || [[ "$file" == "nspanel_blueprint.yaml" ]]; then
echo "Skipping $file"
continue
fi
echo "::group::Validating $file" echo "::group::Validating $file"
yamllint -c "./.rules/yamllint.yml" "$file" yamllint -c "./.rules/yamllint.yml" "$file"
echo "::endgroup::" echo "::endgroup::"
done done
... ...