-
Notifications
You must be signed in to change notification settings - Fork 1
74 lines (70 loc) · 2.56 KB
/
Copy pathcodeql.yml
File metadata and controls
74 lines (70 loc) · 2.56 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
name: CodeQL
on:
push:
branches: [main]
paths:
- 'app/src/**/*.kt'
- 'app/src/**/*.java'
- 'app/build.gradle.kts'
- 'build.gradle.kts'
- 'settings.gradle.kts'
- 'gradle/libs.versions.toml'
- '.github/workflows/codeql.yml'
pull_request:
branches: [main]
paths:
- 'app/src/**/*.kt'
- 'app/src/**/*.java'
- 'app/build.gradle.kts'
- 'build.gradle.kts'
- 'settings.gradle.kts'
- 'gradle/libs.versions.toml'
- '.github/workflows/codeql.yml'
schedule:
# Weekly baseline refresh, Monday 04:23 UTC (odd minute to avoid the
# top-of-hour scheduling stampede GitHub docs warn about).
- cron: '23 4 * * 1'
workflow_dispatch:
permissions:
contents: read
concurrency:
group: codeql-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
analyze:
name: analyze (java-kotlin)
runs-on: ubuntu-latest
timeout-minutes: 60
permissions:
contents: read
security-events: write
actions: read
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
submodules: true
- uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4.8.0
with:
java-version: '21'
distribution: 'temurin'
cache: 'gradle'
- uses: android-actions/setup-android@9fc6c4e9069bf8d3d10b2204b1fb8f6ef7065407 # v3.2.2
- uses: gradle/actions/setup-gradle@ed408507eac070d1f99cc633dbcf757c94c7933a # v4.4.3
with:
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
- uses: github/codeql-action/init@02c5e83432fe5497fd85b873b6c9f16a8578e1d9 # v3.37.0
with:
languages: java-kotlin
build-mode: manual
- name: Build for CodeQL tracing
# CodeQL traces compiler invocations, so every flag here exists to
# force real compilation to happen in-process:
# --no-daemon: the daemon detaches compilers from the traced tree
# --no-build-cache: gradle.properties sets org.gradle.caching=true;
# a cache hit means NO compiler runs and CodeQL sees no source
# (guaranteed on cron runs and any PR without Kotlin changes)
# --no-configuration-cache: same failure mode via the config cache
run: ./gradlew --no-daemon --no-build-cache --no-configuration-cache assembleDebug --stacktrace
- uses: github/codeql-action/analyze@02c5e83432fe5497fd85b873b6c9f16a8578e1d9 # v3.37.0
with:
category: '/language:java-kotlin'