- GitHub Actions caching: - replace implicit setup-java cache writes with explicit Gradle cache restore/save steps - only persist the shared Gradle cache from long-lived develop and release workflows - remove the unnecessary QEMU setup from the single-arch smoke build - disable QEMU image caching in multi-arch publish workflows to stop repeated binfmt cache entries - CodeQL workflow: - replace the generated advanced template with a pinned repo-owned CodeQL workflow - add per-ref concurrency to cancel superseded CodeQL runs before they create more caches - restrict dependency caching to Java, using restore-only on pull requests and full caching on long-lived runs - disable trap caching and turn off PR overlay database caching to avoid repetitive low-value CodeQL caches - Validation: - validated the edited workflow YAML with yq - did not execute the workflows locally
57 lines
1.5 KiB
YAML
57 lines
1.5 KiB
YAML
name: CodeQL
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- develop
|
|
pull_request:
|
|
branches:
|
|
- develop
|
|
schedule:
|
|
- cron: '17 13 * * 0'
|
|
|
|
concurrency:
|
|
group: codeql-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
analyze:
|
|
name: Analyze (${{ matrix.language }})
|
|
runs-on: ubuntu-latest
|
|
|
|
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: none
|
|
- language: javascript-typescript
|
|
build-mode: none
|
|
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
|
|
|
- name: Initialize CodeQL
|
|
uses: github/codeql-action/init@38697555549f1db7851b81482ff19f1fa5c4fedc # v4
|
|
env:
|
|
CODEQL_OVERLAY_DATABASE_MODE: ${{ github.event_name == 'pull_request' && 'none' || '' }}
|
|
with:
|
|
languages: ${{ matrix.language }}
|
|
build-mode: ${{ matrix.build-mode }}
|
|
dependency-caching: ${{ matrix.language == 'java-kotlin' && (github.event_name == 'pull_request' && 'restore' || 'full') || 'none' }}
|
|
trap-caching: false
|
|
|
|
- name: Perform CodeQL Analysis
|
|
uses: github/codeql-action/analyze@38697555549f1db7851b81482ff19f1fa5c4fedc # v4
|
|
with:
|
|
category: /language:${{ matrix.language }}
|