Skip to content

chore(deps): update actions/setup-java action to v4.6.0 (#785) #1428

chore(deps): update actions/setup-java action to v4.6.0 (#785)

chore(deps): update actions/setup-java action to v4.6.0 (#785) #1428

Workflow file for this run

name: Build
on:
push:
branches:
- 1.2.x
- 1.3.x
- 1.4.x
- 1.5.x
pull_request:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
java_version: ['17']
os: ['ubuntu-latest']
env:
JAVA_OPTS: "-XX:+TieredCompilation -XX:TieredStopAtLevel=1"
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up JDK
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
with:
distribution: 'zulu'
java-version: ${{ matrix.java_version }}
cache: 'maven'
- name: Cache SonarCloud packages
if: matrix.java_version == '17'
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Build
run: ./mvnw -B -V -ntp install
- name: Analyze with SonarCloud
if: ${{ env.SONAR_TOKEN != null && env.SONAR_TOKEN != '' && matrix.java_version == '17' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./mvnw -B -V -ntp org.sonarsource.scanner.maven:sonar-maven-plugin:sonar