Files
QieKan-3.0/.github/workflows/codeql.yml
T
HapeLee c4d7bcfac7 ci: 修复CodeQL构建失败 - 移除阿里云镜像并禁用configuration-cache
- CI环境中阿里云镜像不稳定(502 Bad Gateway),构建前用sed移除
- 添加--no-configuration-cache避免序列化错误
2026-06-01 01:15:13 +08:00

53 lines
1.2 KiB
YAML

name: "CodeQL"
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '25 3 * * 1'
jobs:
analyze:
name: Analyze (java-kotlin)
runs-on: ubuntu-latest
permissions:
security-events: write
packages: read
actions: read
contents: read
strategy:
fail-fast: false
matrix:
language: [ 'java-kotlin' ]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: manual
- name: Remove Aliyun mirrors (unreliable in CI)
run: |
sed -i '/maven.aliyun.com/d' settings.gradle
- name: Build with Gradle
run: ./gradlew assembleAppDebug --no-daemon --no-configuration-cache -Dorg.gradle.warning.mode=none
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{ matrix.language }}"