Repository navigation
64 lines (61 loc) · 2.39 KB
/
Copy pathcodeql.yml
File metadata and controls
64 lines (61 loc) · 2.39 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
name: CodeQL
on:
push:
branches: ["main", "master"]
pull_request:
branches: ["main", "master"]
schedule:
- cron: "31 2 * * 2"
workflow_dispatch:
permissions:
contents: read
jobs:
analyze:
name: Analyze (java)
if: >-
github.repository == 'krotname/IdeaMarkdownTableEditor' &&
github.actor == github.repository_owner && github.triggering_actor == github.repository_owner &&
(github.event_name != 'pull_request' ||
(github.event.pull_request.user.login == github.repository_owner &&
github.event.pull_request.head.repo.full_name == github.repository &&
!github.event.pull_request.head.repo.fork))
runs-on: ${{ fromJSON(vars.CI_LINUX_RUNS_ON || '["arc-prod-adler-idea-mte"]') }}
timeout-minutes: 60
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Check ARC cache contract
if: startsWith(runner.name, 'arc-prod-adler-')
shell: bash
run: /opt/arc-cache/arc-cache check-workflow --file .github/workflows/codeql.yml --job "$GITHUB_JOB"
- name: Initialize CodeQL
uses: github/codeql-action/init@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2 # v4.38.2
with:
languages: java-kotlin
build-mode: manual
- name: Set up JDK 17
uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1
with:
distribution: temurin
java-version: '17'
- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
- name: Set up Gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
with:
cache-disabled: ${{ runner.environment == 'self-hosted' }}
- name: Build plugin and core for analysis
run: |
bash ./gradlew clean classes :core:classes --no-daemon --console=plain --no-build-cache --no-configuration-cache --rerun-tasks --max-workers=1 \
-Dorg.gradle.jvmargs='-Xmx768m -XX:MaxMetaspaceSize=256m'
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2 # v4.38.2
with:
threads: 1
ram: 512