-
Notifications
You must be signed in to change notification settings - Fork 2
executable file
·90 lines (75 loc) · 2.57 KB
/
Copy pathcodeql-analysis.yml
File metadata and controls
executable file
·90 lines (75 loc) · 2.57 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
# https://docs.github.com/en/code-security/how-tos/scan-code-for-vulnerabilities/configure-code-scanning/customizing-your-advanced-setup-for-code-scanning
name: CodeQL Scan
on:
push:
branches:
- main
- minor
schedule:
- cron: "16 5 * * *"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref || github.run_id }}
cancel-in-progress: true
jobs:
CodeQL-Scan:
permissions:
actions: read
contents: read
packages: read
security-events: write
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- language: actions
build-mode: none
- language: java-kotlin
build-mode: manual
steps:
- name: ✈ Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: 📦 Setup pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4
with:
version: 10
- name: 📦 Setup Node
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: "24"
- name: ☕ Setup Java
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
java-version: "25"
distribution: "corretto"
- name: 🐘 Setup Gradle
uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
with:
gradle-version: wrapper
- name: 🔧 Ensure gradlew is executable
run: chmod +x ./gradlew
- name: 🔧 Show Gradle version
run: ./gradlew --version
- name: ⚙️ Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
tools: latest
config-file: ./.github/config/codeql.yml
- name: 🏗 Build Java/Kotlin with Gradle
id: gradle_build_java_kotlin
continue-on-error: true
if: >
matrix.build-mode == 'manual' &&
matrix.language == 'java-kotlin'
run: ./gradlew clean build
- name: 🔍 Run CodeQL Analysis (java-kotlin)
if: >
steps.gradle_build_java_kotlin.outcome == 'success'
uses: github/codeql-action/analyze@v3
- name: 🔍 Run CodeQL Analysis
if: matrix.language != 'java-kotlin'
uses: github/codeql-action/analyze@v3