ensure nightly builds don't run for forks
@@ -36,6 +36,8 @@ jobs:
check_core:
name: Check Core
+ # Don't run nightly builds for forks.
+ if: github.repository == 'allenai/allennlp' || github.event_name != 'schedule'
runs-on: ubuntu-latest
strategy:
matrix:
@@ -104,6 +106,8 @@ jobs:
check_models:
name: Check Models
+ # Don't run nightly builds for forks.
+ if: github.repository == 'allenai/allennlp' || github.event_name != 'schedule'
runs-on: ubuntu-latest
strategy:
matrix:
@@ -150,6 +154,8 @@ jobs:
# Builds package distribution files for PyPI.
build_package:
name: Build Package
+ # Don't run nightly builds for forks.
+ if: github.repository == 'allenai/allennlp' || github.event_name != 'schedule'
runs-on: ubuntu-latest
steps:
@@ -216,6 +222,8 @@ jobs:
# Tests installing from the distribution files.
test_package:
name: Test Package
+ # Don't run nightly builds for forks.
+ if: github.repository == 'allenai/allennlp' || github.event_name != 'schedule'
needs: [build_package] # needs the package artifact created from 'build_package' job.
runs-on: ubuntu-latest
strategy:
@@ -253,6 +261,8 @@ jobs:
# Builds Docker image from the core distribution files and uploads to Docker Hub.
docker:
name: Docker
+ # Don't run nightly builds for forks.
+ if: github.repository == 'allenai/allennlp' || github.event_name != 'schedule'
needs: [build_package] # needs the package artifact created from 'build_package' job.
runs-on: ubuntu-latest
@@ -305,6 +315,8 @@ jobs:
# allennlp-docs repo.
docs:
name: Docs
+ # Don't run nightly builds for forks.
+ if: github.repository == 'allenai/allennlp' || github.event_name != 'schedule'
runs-on: ubuntu-latest
steps:
