Repository navigation
61 lines (49 loc) · 1.65 KB
/
Copy pathcodeql.yml
File metadata and controls
61 lines (49 loc) · 1.65 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
# Customization required, as the default CodeQL setup (i.e.autobuild) determines the JDK to be used for the build from the source code.
# The Gradle plugins used as of 2026 require at least Java 17, even if the Java code is and should remain Java 8 compatible.
name: "CodeQL customized"
on: [push, pull_request]
# schedule:
# - cron: '44 9 * * 5'
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
permissions:
# required for all workflows
security-events: write
# required to fetch internal or private CodeQL packs
packages: read
# only required for workflows in private repositories
actions: read
contents: read
strategy:
fail-fast: false
matrix:
include:
- language: actions
build-mode: none
- language: java-kotlin
build-mode: manual
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup JDK to run Gradle
uses: actions/setup-java@v5
with:
java-version: 21
distribution: 'temurin'
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v5
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
- name: Run manual build steps
if: matrix.build-mode == 'manual'
shell: bash
run: ./gradlew clean build -PjavaVersion=21
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: "/language:${{matrix.language}}"