Skip to content

Commit 27d38a9

Browse files
author
Your tabikiji
committed
modefied
1 parent 118e9e2 commit 27d38a9

1 file changed

Lines changed: 44 additions & 40 deletions

File tree

Lines changed: 44 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,54 @@
1-
name: CodeQL (PR fast minimal)
1+
name: "CodeQL Advanced"
22

33
on:
4+
push:
5+
branches: [ "main" ]
46
pull_request:
5-
paths-ignore:
6-
- '**/*.md'
7-
- 'docs/**'
8-
- '**/*.png'
9-
- '**/*.jpg'
10-
workflow_dispatch:
7+
branches: [ "main" ]
8+
schedule:
9+
- cron: '34 23 * * 1'
1110

1211
jobs:
13-
codeql-pr-fast:
14-
runs-on: ubuntu-latest
12+
analyze:
13+
name: Analyze (${{ matrix.language }})
14+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
1515
permissions:
16+
security-events: write
17+
18+
packages: read
19+
1620
actions: read
1721
contents: read
18-
security-events: write
22+
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
include:
27+
- language: java-kotlin
28+
build-mode: manual
1929

2030
steps:
21-
# 1. リポジトリ取得
22-
- name: Checkout repository
23-
uses: actions/checkout@v4
24-
25-
# 2. JDK 17 セットアップ(安定動作用)
26-
- name: Setup JDK 17
27-
uses: actions/setup-java@v4
28-
with:
29-
distribution: temurin
30-
java-version: '17'
31-
32-
# 3. CodeQL初期化(軽量クエリ)
33-
- name: Initialize CodeQL
34-
uses: github/codeql-action/init@v3
35-
with:
36-
languages: java-kotlin
37-
queries: security-extended # 軽量かつ主要チェックのみ
38-
ram: 6144
39-
threads: 2
40-
41-
# 4. 軽量ビルド(APK生成なし・Play Debugフレーバー)
42-
- name: Compile only (Play Debug)
43-
run: |
44-
./gradlew --no-daemon --max-workers=2 -x test -x lint :AnkiDroid:compilePlayDebugSources
45-
46-
# 5. CodeQL解析実行
47-
- name: Perform CodeQL Analysis
48-
uses: github/codeql-action/analyze@v3
49-
with:
50-
category: "/language:java-kotlin"
31+
- name: Checkout repository
32+
uses: actions/checkout@v4
33+
34+
- name: Initialize CodeQL
35+
uses: github/codeql-action/init@v4
36+
with:
37+
languages: ${{ matrix.language }}
38+
build-mode: ${{ matrix.build-mode }}
39+
40+
if: matrix.build-mode == 'manual'
41+
shell: bash
42+
run: |
43+
echo 'If you are using a "manual" build mode for one or more of the' \
44+
'languages you are analyzing, replace this with the commands to build' \
45+
'your code, for example:'
46+
echo ' ./gradlew --no-daemon assembleDebug -x lint'
47+
echo ' ./gradlew --no-daemon assembleRelease -x lint'
48+
# You should replace the above example with the appropriate Gradle tasks
49+
# for your project. Keep this step to perform the build required for CodeQL extraction.
50+
51+
- name: Perform CodeQL Analysis
52+
uses: github/codeql-action/analyze@v4
53+
with:
54+
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)