Skip to content

Commit 90fbd40

Browse files
authored
ci(codql): Add codeQL from github (#100)
This commit is to add codeQL scanning, which was recently introduced by github Signed-off-by: Tam Mach <[email protected]>
1 parent 3d2a579 commit 90fbd40

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/codeql.yaml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: "Code Scanning - Action"
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
# The branches below must be a subset of the branches above
8+
branches: [ master ]
9+
schedule:
10+
- cron: '0 17 * * 5'
11+
12+
jobs:
13+
codeQL:
14+
# CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v2
20+
with:
21+
# Must fetch at least the immediate parents so that if this is
22+
# a pull request then we can checkout the head of the pull request.
23+
# Only include this option if you are running this workflow on pull requests.
24+
fetch-depth: 2
25+
26+
# If this run was triggered by a pull request event then checkout
27+
# the head of the pull request instead of the merge commit.
28+
# Only include this step if you are running this workflow on pull requests.
29+
- run: git checkout HEAD^2
30+
if: ${{ github.event_name == 'pull_request' }}
31+
32+
# Initializes the CodeQL tools for scanning.
33+
- name: Initialize CodeQL
34+
uses: github/codeql-action/init@v1
35+
# Override language selection by uncommenting this and choosing your languages
36+
with:
37+
language: 'javascript'
38+
39+
- run: |
40+
npm install
41+
npm run all
42+
43+
- name: Perform CodeQL Analysis
44+
uses: github/codeql-action/analyze@v1

0 commit comments

Comments
 (0)