davx5-ose/.github/workflows/codeql.yml
Ricki Hirner 06e7eeb391
Don't use Gradle build and configuration cache for releases (#662)
* Don't use Gradle build and configuration cache for releases

- don't enable Gradle build and configuration cache for the project, but recommend it for the developer
- explicitly enable Gradle build and configuration cache for CI test jobs
- let AboutLibraries generate lib definitions itself again
- also don't archive test results (sometimes fails and we never use the results)

* Add encryption key for gradle cache

* Only warn on configuration cache problems (caused by AboutLibraries)
2024-03-20 15:29:21 +01:00

66 lines
1.7 KiB
YAML

name: "CodeQL"
on:
push:
branches: [ "dev-ose", main-ose ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "dev-ose" ]
schedule:
- cron: '22 10 * * 1'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'java' ]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- uses: gradle/actions/setup-gradle@v3
with:
cache-encryption-key: ${{ secrets.gradle_encryption_key }}
- name: Use app/build and gradle configuration cache
uses: actions/cache/restore@v4
with:
key: app_build-tests-without-emulator
path: |
.gradle/configuration-cache
app/build
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
#- name: Autobuild
# uses: github/codeql-action/autobuild@v2
- name: Build
run: ./gradlew --build-cache --configuration-cache --configuration-cache-problems=warn --no-daemon app:assembleOseDebug
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"