Skip to content

Commit 8929bd5

Browse files
author
Steve Riesenberg
committed
Only run prerequisites job if on upstream repo
1 parent e3d1405 commit 8929bd5

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

.github/workflows/continuous-integration-workflow.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ env:
1818
STRUCTURE101_LICENSEID: ${{ secrets.STRUCTURE101_LICENSEID }}
1919
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
2020
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
21-
RUN_JOBS: ${{ github.repository == 'spring-projects/spring-security' }}
2221

2322
permissions:
2423
contents: read
@@ -27,14 +26,14 @@ jobs:
2726
prerequisites:
2827
name: Pre-requisites for building
2928
runs-on: ubuntu-latest
29+
if: ${{ github.repository == 'spring-projects/spring-security' }}
3030
outputs:
3131
runjobs: ${{ steps.continue.outputs.runjobs }}
3232
project_version: ${{ steps.continue.outputs.project_version }}
3333
steps:
3434
- uses: actions/checkout@v2
3535
- id: continue
3636
name: Determine if should continue
37-
if: env.RUN_JOBS == 'true'
3837
run: |
3938
# Run jobs if in upstream repository
4039
echo "::set-output name=runjobs::true"

.github/workflows/pr-build-workflow.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,20 @@ name: PR Build
22

33
on: pull_request
44

5-
env:
6-
RUN_JOBS: ${{ github.repository == 'spring-projects/spring-security' }}
7-
85
permissions:
96
contents: read
107

118
jobs:
129
build:
1310
name: Build
1411
runs-on: ubuntu-latest
12+
if: ${{ github.repository == 'spring-projects/spring-security' }}
1513
steps:
16-
- if: env.RUN_JOBS == 'true'
17-
uses: actions/checkout@v2
14+
- uses: actions/checkout@v2
1815
- name: Set up gradle
1916
uses: spring-io/spring-gradle-build-action@v1
2017
with:
2118
java-version: '11'
2219
distribution: 'adopt'
2320
- name: Build with Gradle
24-
if: env.RUN_JOBS == 'true'
2521
run: ./gradlew clean build --continue --scan

0 commit comments

Comments
 (0)