-
Notifications
You must be signed in to change notification settings - Fork 89
69 lines (59 loc) · 1.72 KB
/
Copy pathcodeql-full.yml
File metadata and controls
69 lines (59 loc) · 1.72 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: CodeQL Full Scan
on:
schedule:
- cron: '42 12 * * 5'
workflow_dispatch:
permissions:
contents: read
security-events: write
packages: read
actions: read
jobs:
detect:
name: Detect CodeQL languages
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.matrix.outputs.matrix }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build matrix
id: matrix
shell: bash
run: |
matrix=$(bash .github/scripts/codeql-matrix.sh)
printf 'matrix=%s\n' "$matrix" >> "$GITHUB_OUTPUT"
analyze:
needs: detect
name: Full scan (${{ matrix.language }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.detect.outputs.matrix) }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 17
if: matrix.language == 'java-kotlin'
uses: actions/setup-java@v5
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
config-file: ./.github/codeql/codeql-full-config.yml
- name: Build project
if: matrix.language == 'java-kotlin'
run: mvn -B clean test-compile -DskipTests -Dcheckstyle.skip=true -Dpmd.skip=true -Dspotbugs.skip=true -Dcpd.skip=true
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: "/codeql-full:${{ matrix.language }}"