Files
iot-dc3/.github/workflows/codeql.yml
T
pnoker 52260f7bd3 build(ci): inline codeql paths-ignore in workflow
The config file only carried two paths-ignore entries, which the init action accepts directly as inputs; folding them into codeql.yml removes the separate .github/codeql directory without behavior change.
2026-09-03 09:03:48 +08:00

72 lines
1.9 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
- language: javascript-typescript
build-mode: none
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
- name: Set up JDK 21
if: matrix.language == 'java-kotlin'
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961
with:
distribution: liberica
java-version: 21
cache: maven
cache-dependency-path: "**/pom.xml"
- name: Initialize CodeQL
uses: github/codeql-action/init@641a925cfafe92d0fdf8b239ba4053e3f8d99d6d
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
queries: +security-and-quality
paths-ignore: |
**/target/**
**/node_modules/**
- 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@641a925cfafe92d0fdf8b239ba4053e3f8d99d6d
with:
category: /language:${{ matrix.language }}