Skip to content

Commit cdbfaf8

Browse files
committed
Update CodeQL workflow from latest template
1 parent a219b74 commit cdbfaf8

File tree

1 file changed

+34
-6
lines changed

1 file changed

+34
-6
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,56 @@
1-
name: "CodeQL Analysis"
1+
name: "CodeQL"
22

33
on:
44
push:
5+
branches: [ main ]
6+
pull_request:
7+
# The branches below must be a subset of the branches above
8+
branches: [ main ]
59
schedule:
610
- cron: '0 2 * * 3'
711

812
jobs:
9-
codeql-build:
10-
name: CodeQL Build
13+
analyze:
14+
name: Analyze
15+
runs-on: ubuntu-latest
1116

1217
strategy:
1318
fail-fast: false
14-
15-
runs-on: ubuntu-latest
19+
matrix:
20+
language: [ 'javascript' ]
21+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
22+
# Learn more:
23+
# 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
1624

1725
steps:
1826
- name: Checkout repository
1927
uses: actions/checkout@v2
2028

29+
# Initializes the CodeQL tools for scanning.
2130
- name: Initialize CodeQL
2231
uses: github/codeql-action/init@v1
23-
32+
with:
33+
languages: ${{ matrix.language }}
34+
# If you wish to specify custom queries, you can do so here or in a config file.
35+
# By default, queries listed here will override any specified in a config file.
36+
# Prefix the list here with "+" to use these queries and those in the config file.
37+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
38+
39+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
40+
# If this step fails, then you should remove it and run the build manually (see below)
2441
- name: Autobuild
2542
uses: github/codeql-action/autobuild@v1
2643

44+
# ℹ️ Command-line programs to run using the OS shell.
45+
# 📚 https://git.io/JvXDl
46+
47+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
48+
# and modify them (or add more) to build your code if your project
49+
# uses a compiled language
50+
51+
#- run: |
52+
# make bootstrap
53+
# make release
54+
2755
- name: Perform CodeQL Analysis
2856
uses: github/codeql-action/analyze@v1

0 commit comments

Comments
 (0)