name: PR Build on: pull_request env: RUN_JOBS: ${{ github.repository == 'spring-projects/spring-security' }} jobs: build: name: Build runs-on: ubuntu-latest steps: - if: env.RUN_JOBS == 'true' uses: actions/checkout@v2 - name: Set up JDK if: env.RUN_JOBS == 'true' uses: actions/setup-java@v1 with: java-version: '17' - name: Setup Gradle if: env.RUN_JOBS == 'true' uses: gradle/gradle-build-action@v2 with: cache-read-only: true env: GRADLE_USER_HOME: ~/.gradle - name: Build with Gradle if: env.RUN_JOBS == 'true' run: ./gradlew clean build --continue --scan