#13: Migrate deployment to Central Portal #25
Workflow file for this run
This file contains hidden or 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: Build | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| matrix-build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| java: [11, 17, 21, 24] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }}-java-${{ matrix.java }} | |
| cancel-in-progress: true | |
| env: | |
| DEFAULT_JAVA: 11 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| cache: maven | |
| distribution: temurin | |
| # Sonar plugin needs at least Java 17 at build time | |
| java-version: | | |
| ${{ matrix.java }} | |
| 17 | |
| - name: Build with Java ${{ matrix.java }} | |
| run: mvn --errors --batch-mode clean org.jacoco:jacoco-maven-plugin:prepare-agent install -Djava.version=${{ matrix.java }} | |
| - name: Sonar | |
| if: ${{ env.DEFAULT_JAVA == matrix.java && env.SONAR_TOKEN != null }} | |
| run: mvn --errors --batch-mode -Dsonar.token=$SONAR_TOKEN sonar:sonar | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
| build: | |
| needs: matrix-build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - run: echo "Build successful" |