1
0
mirror of synced 2026-05-22 21:33:16 +00:00

Stop CI Jobs on Forks

Closes gh-9701
This commit is contained in:
Josh Cummings
2021-05-03 14:12:12 -06:00
parent 6413511eb6
commit a493660cdb
2 changed files with 24 additions and 6 deletions
+8 -2
View File
@@ -2,21 +2,27 @@ name: PR Build
on: pull_request
env:
RUN_JOBS: ${{ github.repository == 'spring-projects/spring-security' }}
jobs:
build:
name: Build
runs-on: ubuntu-latest
if: github.repository == 'spring-projects/spring-security'
steps:
- uses: actions/checkout@v2
- 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: '11'
- name: Cache Gradle packages
if: env.RUN_JOBS == 'true'
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
- name: Build with Gradle
if: env.RUN_JOBS == 'true'
run: ./gradlew clean build --continue --scan