diff --git a/.github/workflows/validate_yamllint.yml b/.github/workflows/validate_yamllint.yml index a38595f..169cbda 100644 --- a/.github/workflows/validate_yamllint.yml +++ b/.github/workflows/validate_yamllint.yml @@ -9,9 +9,19 @@ on: jobs: code_scan: - name: Validate Blueprint YAML + name: Validate YAML runs-on: "ubuntu-latest" steps: - - uses: actions/checkout@v4.1.0 + - name: Check out code + uses: actions/checkout@v4.1.0 + + - name: Identify changed files + uses: tj-actions/changed-files@v41 + id: changed-files + with: + files: '**/*.y*ml' + separator: "," + - name: Validate YAML - run: yamllint -c "./.rules/yamllint.yml" + if: steps.changed-files.outputs.any_changed == 'true' + run: yamllint -c "./.rules/yamllint.yml" --list-files -f github -s "${{ steps.changed-files.outputs.all_changed_files }}"