2020-06-11 11:07:34 -07:00
|
|
|
name: PR Build
|
|
|
|
|
2020-06-17 12:16:10 -07:00
|
|
|
on: pull_request
|
2020-06-11 11:07:34 -07:00
|
|
|
|
2021-05-03 14:12:12 -06:00
|
|
|
env:
|
|
|
|
RUN_JOBS: ${{ github.repository == 'spring-projects/spring-security' }}
|
|
|
|
|
2020-06-11 11:07:34 -07:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-05-03 14:12:12 -06:00
|
|
|
- if: env.RUN_JOBS == 'true'
|
|
|
|
uses: actions/checkout@v2
|
2020-06-11 11:07:34 -07:00
|
|
|
- name: Set up JDK
|
2021-05-03 14:12:12 -06:00
|
|
|
if: env.RUN_JOBS == 'true'
|
2020-06-11 11:07:34 -07:00
|
|
|
uses: actions/setup-java@v1
|
|
|
|
with:
|
2021-02-05 15:21:07 -07:00
|
|
|
java-version: '11'
|
2020-06-11 11:07:34 -07:00
|
|
|
- name: Cache Gradle packages
|
2021-05-03 14:12:12 -06:00
|
|
|
if: env.RUN_JOBS == 'true'
|
2020-06-11 11:07:34 -07:00
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: ~/.gradle/caches
|
|
|
|
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
|
|
|
|
- name: Build with Gradle
|
2021-05-03 14:12:12 -06:00
|
|
|
if: env.RUN_JOBS == 'true'
|
2020-09-30 07:20:12 -07:00
|
|
|
run: ./gradlew clean build --continue --scan
|