Skip to content

sonar: run sonar analyze with jdk 11 #2725

sonar: run sonar analyze with jdk 11

sonar: run sonar analyze with jdk 11 #2725

Workflow file for this run

name: Build
on:
schedule:
- cron: "15 0 * * *"
push:
branches:
- main
pull_request:
workflow_dispatch:
env:
MAVEN_ARGS: "--no-transfer-progress --errors --fail-at-end --show-version"
jobs:
build:
name: build and analyse
strategy:
matrix:
java: [ '11', '17', '21', '22', '23' ]
os: [ 'ubuntu-24.04', 'macos-14', 'windows-2022' ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: |
11
${{ matrix.java }}
cache: 'maven'
- name: Build
run: ./mvnw -Pcoverage clean verify
- name: SonarCloud - Analyse
if: ${{ github.repository == 'focus-shift/jollyday' && matrix.java == 21 && matrix.os == 'ubuntu-24.04' && (github.event_name != 'pull_request' || (github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]')) }}
run: >

Check failure on line 41 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / Build

Invalid workflow file

The workflow is not valid. .github/workflows/build.yml (Line: 41, Col: 14): Unrecognized named-value: 'JAVA_HOME_11_X64'. Located at position 1 within expression: JAVA_HOME_11_X64
./mvnw -Pcoverage verify
sonar:sonar
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.organization=focus-shift
-Dsonar.projectKey=focus-shift_jollyday
-Dsonar.java.jdkHome=${{ JAVA_HOME_11_X64 }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}