mirror of
https://gitee.com/pnoker/iot-dc3.git
synced 2026-11-01 02:31:46 +08:00
67 lines
1.6 KiB
YAML
67 lines
1.6 KiB
YAML
name: CodeQL Advanced
|
|
|
|
on:
|
|
push:
|
|
branches: [ develop, main ]
|
|
pull_request:
|
|
branches: [ develop, main ]
|
|
schedule:
|
|
- cron: '36 18 * * 3'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: codeql-${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
analyze:
|
|
name: Analyze (${{ matrix.language }})
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 90
|
|
permissions:
|
|
actions: read
|
|
contents: read
|
|
packages: read
|
|
security-events: write
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- language: actions
|
|
build-mode: none
|
|
- language: java-kotlin
|
|
build-mode: manual
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up JDK 21
|
|
if: matrix.language == 'java-kotlin'
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: liberica
|
|
java-version: 21
|
|
cache: maven
|
|
cache-dependency-path: "**/pom.xml"
|
|
|
|
- name: Initialize CodeQL
|
|
uses: github/codeql-action/init@v3
|
|
with:
|
|
languages: ${{ matrix.language }}
|
|
build-mode: ${{ matrix.build-mode }}
|
|
queries: +security-and-quality
|
|
|
|
- name: Build Java for CodeQL
|
|
if: matrix.build-mode == 'manual'
|
|
run: |
|
|
set -euo pipefail
|
|
mvn -U -e -B -DskipTests compile --no-transfer-progress
|
|
|
|
- name: Perform CodeQL Analysis
|
|
uses: github/codeql-action/analyze@v3
|
|
with:
|
|
category: /language:${{ matrix.language }}
|