Skip to content

Commit

Permalink
[CI] Only trigger CodeQL analysis on C/CPP related files
Browse files Browse the repository at this point in the history
Signed-off-by: hydai <[email protected]>
  • Loading branch information
hydai authored and q82419 committed Jun 20, 2023
1 parent f483849 commit dda6ee6
Showing 1 changed file with 30 additions and 9 deletions.
39 changes: 30 additions & 9 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,40 @@ on:
push:
branches:
- master
paths:
- '**/*.c'
- '**/*.cc'
- '**/*.cpp'
- '**/*.cmake'
- '**/*.h'
- '**/*.hpp'
- '**/*.in'
- '**/*.inc'
- '**/*.ipp'
- '**/*.lds'
- '**/CMakeLists.txt'
- '!docs/**'
- '!.github/**'
- '!utils/**'
pull_request:
branches:
- master
- 'proposal/**'
paths-ignore:
- '**/*.md'
paths:
- '**/*.c'
- '**/*.cc'
- '**/*.cpp'
- '**/*.cmake'
- '**/*.h'
- '**/*.hpp'
- '**/*.in'
- '**/*.inc'
- '**/*.ipp'
- '**/*.lds'
- '**/CMakeLists.txt'
- '!docs/**'
- '!.github/**'
- '!utils/**'
schedule:
- cron: '15 18 * * 6'

Expand All @@ -38,9 +66,6 @@ jobs:
fail-fast: false
matrix:
language: [ 'cpp' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
Expand All @@ -51,10 +76,6 @@ jobs:
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

- name: Build
run: |
Expand Down

0 comments on commit dda6ee6

Please sign in to comment.