Skip to content

Commit d8d11f8

Browse files
committed
ci(codeql): limit run to js updates
1 parent f86b9e1 commit d8d11f8

File tree

1 file changed

+36
-33
lines changed

1 file changed

+36
-33
lines changed

.github/workflows/codeql.yml

Lines changed: 36 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,18 @@
99
# the `language` matrix defined below to confirm you have the correct set of
1010
# supported CodeQL languages.
1111
#
12-
name: "CodeQL"
12+
name: 'CodeQL'
1313

1414
on:
1515
push:
16-
branches: [ "main" ]
16+
branches: ['main']
17+
paths:
18+
- '**.js'
1719
pull_request:
1820
# The branches below must be a subset of the branches above
19-
branches: [ "main" ]
21+
branches: ['main']
22+
paths:
23+
- '**.js'
2024
schedule:
2125
- cron: '25 2 * * 4'
2226

@@ -32,43 +36,42 @@ jobs:
3236
strategy:
3337
fail-fast: false
3438
matrix:
35-
language: [ 'javascript' ]
39+
language: ['javascript']
3640
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
3741
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
3842

3943
steps:
40-
- name: Checkout repository
41-
uses: actions/checkout@v4
44+
- name: Checkout repository
45+
uses: actions/checkout@v4
4246

43-
# Initializes the CodeQL tools for scanning.
44-
- name: Initialize CodeQL
45-
uses: github/codeql-action/init@v2
46-
with:
47-
languages: ${{ matrix.language }}
48-
# If you wish to specify custom queries, you can do so here or in a config file.
49-
# By default, queries listed here will override any specified in a config file.
50-
# Prefix the list here with "+" to use these queries and those in the config file.
51-
52-
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
53-
# queries: security-extended,security-and-quality
47+
# Initializes the CodeQL tools for scanning.
48+
- name: Initialize CodeQL
49+
uses: github/codeql-action/init@v2
50+
with:
51+
languages: ${{ matrix.language }}
52+
# If you wish to specify custom queries, you can do so here or in a config file.
53+
# By default, queries listed here will override any specified in a config file.
54+
# Prefix the list here with "+" to use these queries and those in the config file.
5455

55-
56-
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
57-
# If this step fails, then you should remove it and run the build manually (see below)
58-
- name: Autobuild
59-
uses: github/codeql-action/autobuild@v2
56+
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
57+
# queries: security-extended,security-and-quality
6058

61-
# ℹ️ Command-line programs to run using the OS shell.
62-
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
59+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
60+
# If this step fails, then you should remove it and run the build manually (see below)
61+
- name: Autobuild
62+
uses: github/codeql-action/autobuild@v2
6363

64-
# If the Autobuild fails above, remove it and uncomment the following three lines.
65-
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
64+
# ℹ️ Command-line programs to run using the OS shell.
65+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
6666

67-
# - run: |
68-
# echo "Run, Build Application using script"
69-
# ./location_of_script_within_repo/buildscript.sh
67+
# If the Autobuild fails above, remove it and uncomment the following three lines.
68+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
7069

71-
- name: Perform CodeQL Analysis
72-
uses: github/codeql-action/analyze@v2
73-
with:
74-
category: "/language:${{matrix.language}}"
70+
# - run: |
71+
# echo "Run, Build Application using script"
72+
# ./location_of_script_within_repo/buildscript.sh
73+
74+
- name: Perform CodeQL Analysis
75+
uses: github/codeql-action/analyze@v2
76+
with:
77+
category: '/language:${{matrix.language}}'

0 commit comments

Comments
 (0)