name: PR Build

on: pull_request

jobs:
  build:
    name: Build
    runs-on: ubuntu-latest
    if: github.repository == 'spring-projects/spring-security'
    steps:
      - uses: actions/checkout@v2
      - name: Set up JDK
        uses: actions/setup-java@v1
        with:
          java-version: '11'
      - name: Cache Gradle packages
        uses: actions/cache@v2
        with:
          path: ~/.gradle/caches
          key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
      - name: Build with Gradle
        run: ./gradlew clean build --continue --scan
