-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (45 loc) · 1.46 KB
/
Copy pathcodeql-analysis.yml
File metadata and controls
53 lines (45 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: "CodeQL"
on:
push:
branches: [main, master, dev]
pull_request:
branches: [main, master, dev]
schedule:
- cron: "39 0 * * 0"
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: ["java-kotlin"]
steps:
- name: Checkout repository
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
- name: Set up JDK 21
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: "temurin"
java-version: "21"
cache: "gradle"
- name: Initialize CodeQL
uses: github/codeql-action/init@5595ccaf912efad79be6eef63a5619ff05969be3 # v4
with:
languages: ${{ matrix.language }}
build-mode: manual
# CodeQL must observe a real javac run (no daemon / no cache / clean).
# Scan API + nms-api only — full :packetapi pulls paperweight and often yields no traced sources.
- name: Build for CodeQL
run: |
chmod +x gradlew
./gradlew clean :api:compileJava :nms-api:compileJava \
-x test --no-daemon --no-build-cache
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@5595ccaf912efad79be6eef63a5619ff05969be3 # v4
with:
category: "/language:${{ matrix.language }}"