Skip to content
This repository was archived by the owner on Dec 16, 2022. It is now read-only.

Commit 99bf1ff

Browse files
authored
ensure nightly builds don't run for forks (#4240)
1 parent 3f19336 commit 99bf1ff

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/master.yml

+12
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ jobs:
3636
3737
check_core:
3838
name: Check Core
39+
# Don't run nightly builds for forks.
40+
if: github.repository == 'allenai/allennlp' || github.event_name != 'schedule'
3941
runs-on: ubuntu-latest
4042
strategy:
4143
matrix:
@@ -104,6 +106,8 @@ jobs:
104106
105107
check_models:
106108
name: Check Models
109+
# Don't run nightly builds for forks.
110+
if: github.repository == 'allenai/allennlp' || github.event_name != 'schedule'
107111
runs-on: ubuntu-latest
108112
strategy:
109113
matrix:
@@ -150,6 +154,8 @@ jobs:
150154
# Builds package distribution files for PyPI.
151155
build_package:
152156
name: Build Package
157+
# Don't run nightly builds for forks.
158+
if: github.repository == 'allenai/allennlp' || github.event_name != 'schedule'
153159
runs-on: ubuntu-latest
154160

155161
steps:
@@ -216,6 +222,8 @@ jobs:
216222
# Tests installing from the distribution files.
217223
test_package:
218224
name: Test Package
225+
# Don't run nightly builds for forks.
226+
if: github.repository == 'allenai/allennlp' || github.event_name != 'schedule'
219227
needs: [build_package] # needs the package artifact created from 'build_package' job.
220228
runs-on: ubuntu-latest
221229
strategy:
@@ -253,6 +261,8 @@ jobs:
253261
# Builds Docker image from the core distribution files and uploads to Docker Hub.
254262
docker:
255263
name: Docker
264+
# Don't run nightly builds for forks.
265+
if: github.repository == 'allenai/allennlp' || github.event_name != 'schedule'
256266
needs: [build_package] # needs the package artifact created from 'build_package' job.
257267
runs-on: ubuntu-latest
258268

@@ -305,6 +315,8 @@ jobs:
305315
# allennlp-docs repo.
306316
docs:
307317
name: Docs
318+
# Don't run nightly builds for forks.
319+
if: github.repository == 'allenai/allennlp' || github.event_name != 'schedule'
308320
runs-on: ubuntu-latest
309321

310322
steps:

0 commit comments

Comments
 (0)