name: "Build" on: pull_request: paths-ignore: - '.txt' - '*.MD' - '*.md' - 'LICENSE' - 'docs/**' push: tags-ignore: - '*' paths-ignore: - '.txt' - '*.MD' - '*.md' - 'LICENSE' - 'docs/**' jobs: build: if: (github.event.name == 'push' && github.event.repository == 'WebGoat/WebGoat') 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