57 lines
1.7 KiB
YAML
57 lines
1.7 KiB
YAML
name: CodeQL (daily)
|
|
|
|
on:
|
|
schedule:
|
|
# daily at 1:30 UTC
|
|
- cron: "30 1 * * *"
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
|
|
jobs:
|
|
analyze:
|
|
permissions:
|
|
actions: read # for github/codeql-action/init to get workflow details
|
|
security-events: write # for github/codeql-action/analyze to upload SARIF results
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
|
|
|
- name: Free disk space
|
|
run: .github/scripts/gha-free-disk-space.sh
|
|
|
|
- name: Set up Java 17
|
|
uses: actions/setup-java@b36c23c0d998641eff861008f374ee103c25ac73 # v4.4.0
|
|
with:
|
|
distribution: temurin
|
|
java-version-file: .java-version
|
|
|
|
- name: Initialize CodeQL
|
|
uses: github/codeql-action/init@6db8d6351fd0be61f9ed8ebd12ccd35dcec51fea # v3.26.11
|
|
with:
|
|
languages: java
|
|
# using "latest" helps to keep up with the latest Kotlin support
|
|
# see https://github.com/github/codeql-action/issues/1555#issuecomment-1452228433
|
|
tools: latest
|
|
|
|
- name: Setup Gradle
|
|
uses: gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808 # v4.1.0
|
|
|
|
- name: Build
|
|
# skipping build cache is needed so that all modules will be analyzed
|
|
run: ./gradlew assemble -x javadoc --no-build-cache --no-daemon
|
|
|
|
- name: Perform CodeQL analysis
|
|
uses: github/codeql-action/analyze@6db8d6351fd0be61f9ed8ebd12ccd35dcec51fea # v3.26.11
|
|
|
|
workflow-notification:
|
|
needs:
|
|
- analyze
|
|
if: always()
|
|
uses: ./.github/workflows/reusable-workflow-notification.yml
|
|
with:
|
|
success: ${{ needs.analyze.result == 'success' }}
|