From 37450c5643cb151c3c49690f9bceea2a832ba297 Mon Sep 17 00:00:00 2001 From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com> Date: Thu, 11 Jan 2024 12:01:34 +0100 Subject: [PATCH] Update validate_yamllint.yml --- .github/workflows/validate_yamllint.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) 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 }}"