Skip to content

ci: onboard to the OSS Community Develocity instance #409

ci: onboard to the OSS Community Develocity instance

ci: onboard to the OSS Community Develocity instance #409

Workflow file for this run

name: CodeQL
on:
push:
branches: [main]
pull_request:
branches: [main]
merge_group:
schedule:
# Weekly scan, Mondays 06:42 UTC, to catch new queries Google/GitHub publish.
- cron: '42 6 * * 1'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
permissions:
contents: read
security-events: write
actions: read
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
# java-kotlin is temporarily disabled: CodeQL <= 2.26.1 rejects
# Kotlin 2.4.10 ("Kotlin version 2.4.10 is too recent"), so the
# traced build fails and no analysis ever runs. Support (ceiling
# 2.4.20) is already merged upstream and ships with the next CLI
# release, which codeql-action@v4 picks up automatically.
# Once a CodeQL CLI newer than 2.26.1 is out, uncomment to
# re-enable and verify Analyze (java-kotlin) goes green.
# - language: java-kotlin
# build-mode: manual
- language: actions
build-mode: none
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up JDK 21
if: matrix.language == 'java-kotlin'
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0
with:
distribution: temurin
java-version: '21'
- name: Cache Gradle
if: matrix.language == 'java-kotlin'
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/libs.versions.toml') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Initialize CodeQL
uses: github/codeql-action/init@f205ea1c3313d32999d8d6a48b4f6530d4437b38 # v4.37.4
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
queries: security-and-quality
- name: Build (java-kotlin)
if: matrix.language == 'java-kotlin'
run: |
chmod +x gradlew
./gradlew compileKotlinJvm --no-daemon --no-build-cache --stacktrace
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@f205ea1c3313d32999d8d6a48b4f6530d4437b38 # v4.37.4
with:
category: /language:${{ matrix.language }}