Skip to content

Bump org.slf4j:slf4j-api from 2.0.18 to 2.0.19 #719

Bump org.slf4j:slf4j-api from 2.0.18 to 2.0.19

Bump org.slf4j:slf4j-api from 2.0.18 to 2.0.19 #719

Workflow file for this run

# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Java CI with Maven
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5.6.0
with:
distribution: 'temurin'
java-version: 17
- name: Cache SonarCloud packages
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Maven packages
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
if [[ $SONAR_TOKEN != "" ]]; then
mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent install sonar:sonar
else
mvn --batch-mode --update-snapshots verify
fi
spotbugs:
if: github.event_name == 'pull_request' || github.event_name == 'push'
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Set up JDK 17
uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5.6.0
with:
distribution: 'temurin'
java-version: 17
- name: Cache Maven packages
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Run SpotBugs analysis
run: mvn --batch-mode --update-snapshots compile com.github.spotbugs:spotbugs-maven-plugin:spotbugs
- name: Upload SpotBugs SARIF report
if: always()
continue-on-error: true
uses: github/codeql-action/upload-sarif@bb16b9baa2ec4010b29f5c606d57d01190139edd # v4.37.1
with:
sarif_file: target/spotbugsSarif.json
category: spotbugs
- name: Fail job if SpotBugs found bugs
run: |
bug_count=$(grep -o '<BugInstance' target/spotbugsXml.xml | wc -l | tr -d '[:space:]' || true)
if [ "$bug_count" -gt 0 ]; then
echo "::error::SpotBugs found $bug_count bug(s). See the Checks/Security tab for annotated details."
exit 1
fi