Skip to content

Commit 3392b51

Browse files
authored
Add codeql.yml (TheAlgorithms#4966)
1 parent 1518e84 commit 3392b51

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/codeql.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
name: "CodeQL"
3+
4+
on:
5+
workflow_dispatch:
6+
push:
7+
branches:
8+
- master
9+
pull_request:
10+
schedule:
11+
- cron: '53 3 * * 0'
12+
13+
env:
14+
LANGUAGE: 'java-kotlin'
15+
16+
jobs:
17+
analyze:
18+
name: Analyze
19+
runs-on: 'ubuntu-latest'
20+
permissions:
21+
actions: read
22+
contents: read
23+
security-events: write
24+
25+
steps:
26+
- name: Checkout repository
27+
uses: actions/checkout@v3
28+
29+
- name: Set up JDK 17
30+
uses: actions/setup-java@v3
31+
with:
32+
java-version: 17
33+
distribution: 'adopt'
34+
35+
- name: Initialize CodeQL
36+
uses: github/codeql-action/init@v2
37+
with:
38+
languages: ${{ env.LANGUAGE }}
39+
40+
- name: Build
41+
run: mvn --batch-mode --update-snapshots verify
42+
43+
- name: Perform CodeQL Analysis
44+
uses: github/codeql-action/analyze@v2
45+
with:
46+
category: "/language:${{env.LANGUAGE}}"
47+
...

0 commit comments

Comments
 (0)