Merge pull request #7058 from MahtraDR/main #487
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Valid YAML syntax | |
on: | |
push: | |
branches: | |
- 'main' | |
paths: | |
- "data/*.yaml" | |
- "profiles/**.yaml" | |
pull_request: | |
paths: | |
- "data/*.yaml" | |
- "profiles/**.yaml" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
validate-yaml: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Get changed files | |
id: changed-files | |
uses: tj-actions/changed-files@v41 | |
with: | |
files: | | |
data/*.yaml | |
profiles/*.yaml | |
- name: Validate YAML file | |
if: steps.changed-files-excluded.outputs.any_changed == 'true' | |
run: | | |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do | |
yamllint -d relaxed -f parsable ${file} | |
done |