This is an automated email from the ASF dual-hosted git repository.

derrickaw pushed a commit to branch 20260714_updateCodeQLWorkflow
in repository https://gitbox.apache.org/repos/asf/beam.git

commit 2241702db0f60de3e2175b6e5407b21273dc4d84
Author: Derrick Williams <[email protected]>
AuthorDate: Tue Jul 14 19:11:39 2026 +0000

    add language filtering for codeql
---
 .github/workflows/codeql.yml | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index 0a7aa09530a..01b7044650e 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -27,8 +27,49 @@ on:
     - cron: '25 10 * * 6'
 
 jobs:
+  detect-changes:
+    runs-on: ubuntu-latest
+    permissions:
+      contents: read
+      pull-requests: read
+    outputs:
+      actions: ${{ steps.filter.outputs.actions }}
+      go: ${{ steps.filter.outputs.go }}
+      java-kotlin: ${{ steps.filter.outputs['java-kotlin'] }}
+      javascript-typescript: ${{ steps.filter.outputs['javascript-typescript'] 
}}
+      python: ${{ steps.filter.outputs.python }}
+      rust: ${{ steps.filter.outputs.rust }}
+    steps:
+      - uses: dorny/paths-filter@v3
+        id: filter
+        with:
+          filters: |
+            actions:
+              - '.github/**'
+            go:
+              - 'sdks/go/**'
+              - 'playground/backend/**'
+              - 'learning/katas/go/**'
+              - 'learning/tour-of-beam/backend/**'
+            java-kotlin:
+              - 'sdks/java/**'
+              - 'runners/**'
+              - 'examples/java/**'
+              - 'examples/kotlin/**'
+            javascript-typescript:
+              - 'sdks/typescript/**'
+            python:
+              - 'sdks/python/**'
+            rust:
+              - '**/*.rs'
+
   analyze:
     name: Analyze (${{ matrix.language }})
+    needs: detect-changes
+    if: |
+      github.event_name == 'schedule' ||
+      github.event_name == 'workflow_dispatch' ||
+      needs.detect-changes.outputs[matrix.language] == 'true'
     # Runner size impacts CodeQL analysis time. To learn more, please see:
     #   - https://gh.io/recommended-hardware-resources-for-running-codeql
     #   - https://gh.io/supported-runners-and-hardware-resources

Reply via email to