Skip to content

Amend SonarCloud GitHub job so that it works with a forked repository #651

Amend SonarCloud GitHub job so that it works with a forked repository

Amend SonarCloud GitHub job so that it works with a forked repository #651

Workflow file for this run

name: Maven build
on:
push:
branches: [ main ]
pull_request:
types: [ opened, synchronize, reopened ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 11
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-v8-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2-v8
- name: Build
run: mvn --batch-mode compile
- name: Test and package
run: mvn --batch-mode package