Skip to content

Commit

Permalink
Github: CodeQl action (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
Compile-Ninja authored Oct 18, 2024
1 parent 99bd7bb commit 11b9a30
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: "CodeQL"

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
language: [ 'java' ]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 21

- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}

- name: Build with Maven
run: mvn -B package

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
with:
category: "/language:${{ matrix.language }}"

0 comments on commit 11b9a30

Please sign in to comment.