From 551fb113b34a13fa0eb65676900a6e1e3c3952b7 Mon Sep 17 00:00:00 2001 From: Jonas Wagner Date: Wed, 10 Jul 2024 11:22:23 +0200 Subject: [PATCH] WIP Add CodeQL Job --- .github/workflows/build.yml | 41 +++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e69de29b..e9a54fd6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -0,0 +1,41 @@ +name: Build + +on: + push: + branches: [ "*" ] + tags: [ "v*.*.*" ] + pull_request: + branches: [ "main" ] + +jobs: + analyze: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: 21 + + - name: Cache Local Maven Repo + uses: actions/cache@v4 + with: + path: ~/.m2/repository + key: maven-${{ hashFiles('pom.xml') }} + + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: java + queries: security-and-quality + + - name: Version + run: mvn --version + + - name: Build + run: mvn -B compile + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3