From a4c5994afacef527b03baecef5f36ada68306542 Mon Sep 17 00:00:00 2001 From: Marty T <120425148+tippmar-nr@users.noreply.github.com> Date: Fri, 8 Mar 2024 14:21:38 -0600 Subject: [PATCH] ci: Add check for modified files before analyzing code (#2325) --- .github/workflows/codeql.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index a0d243b09c..39f697084d 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -17,8 +17,18 @@ concurrency: cancel-in-progress: true jobs: + check-modified-files: + name: Check if source files were modified, skip remaining jobs if not + uses: ./.github/workflows/check_modified_files.yml + secrets: inherit + permissions: + contents: read + pull-requests: read + analyze-dotnet: name: Analyze .NET + needs: check-modified-files + if: needs.check-modified-files.outputs.non-workflow-files-changed == 'true' runs-on: windows-latest timeout-minutes: 120 permissions: @@ -55,6 +65,8 @@ jobs: analyze-cpp: name: Analyze C++ + needs: check-modified-files + if: needs.check-modified-files.outputs.non-workflow-files-changed == 'true' runs-on: windows-latest timeout-minutes: 120 permissions: