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

zhangjintao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-ingress-controller.git


The following commit(s) were added to refs/heads/master by this push:
     new d7128a1  chore: skip CodeQL if go files have no changes (#636)
d7128a1 is described below

commit d7128a1812053e9341f59f0e9c13c1c513c9db42
Author: Sarasa Kisaragi <[email protected]>
AuthorDate: Wed Aug 18 14:23:22 2021 +0800

    chore: skip CodeQL if go files have no changes (#636)
    
    Signed-off-by: Ling Samuel <[email protected]>
---
 .github/workflows/codeql-analysis.yml | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/.github/workflows/codeql-analysis.yml 
b/.github/workflows/codeql-analysis.yml
index d69c38a..c229e8e 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -29,10 +29,31 @@ on:
     - cron: '25 5 * * 5'
 
 jobs:
+  changes:
+    runs-on: ubuntu-latest
+    outputs:
+      go: ${{ steps.filter.outputs.go }}
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v2
+        with:
+          submodules: recursive
+
+      - uses: ./.github/actions/paths-filter
+        id: filter
+        with:
+          token: ${{ secrets.GITHUB_TOKEN }}
+          filters: |
+            go:
+              - '*.go'
+              - '**/*.go'
   analyze:
     name: Analyze
     runs-on: ubuntu-latest
 
+    needs: changes
+    if: |
+      (needs.changes.outputs.go == 'true')
     strategy:
       fail-fast: false
       matrix:

Reply via email to