build(java): add jdk 21 and 22 #1272
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: SonarCloud Analysis | |
on: [ push ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
if: ${{ github.actor != 'dependabot[bot]' }} | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Cache Maven Repo | |
id: cache-maven-repo | |
uses: actions/cache@v1 | |
with: | |
path: /home/runner/.m2/repository | |
key: ${{ runner.os }}-maven-repo | |
- name: Set up JDK | |
uses: actions/setup-java@v2 | |
with: | |
distribution: adopt | |
java-version: 21 | |
- name: Build with Maven | |
run: mvn -B --no-transfer-progress org.jacoco:jacoco-maven-plugin:prepare-agent package --file pom.xml --settings settings.xml | |
env: | |
USENAME: ${{github.actor}} | |
PASSWORD: ${{ secrets.GITHUB_TOKEN }} | |
- name: Sonarqube analysis | |
run: mvn -B --no-transfer-progress initialize sonar:sonar --file pom.xml --settings settings.xml | |
env: | |
USENAME: ${{github.actor}} | |
PASSWORD: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |