name: "Pull request build" on: pull_request: paths-ignore: - '.txt' - '*.MD' - '*.md' - 'LICENSE' - 'docs/**' push: branches: - master - develop - release/* tags-ignore: - '*' paths-ignore: - '.txt' - '*.MD' - '*.md' - 'LICENSE' - 'docs/**' jobs: build: # Run on PR from different remote not on PR from within WebGoat (committers) if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-latest, windows-latest, macos-latest] java: [16] steps: - uses: actions/checkout@v2 - name: Set up JDK ${{ matrix.java }} uses: actions/setup-java@v2 with: distribution: 'zulu' java-version: ${{ matrix.java }} architecture: x64 - name: Cache Maven packages uses: actions/cache@v2.1.5 with: path: ~/.m2 key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} restore-keys: ${{ runner.os }}-m2 - name: Build with Maven run: mvn package