From 99bf1ffb7dbb18c3378f6fdf067726fd97a14cd1 Mon Sep 17 00:00:00 2001 From: Evan Pete Walsh Date: Thu, 14 May 2020 11:52:31 -0700 Subject: [PATCH] ensure nightly builds don't run for forks (#4240) --- .github/workflows/master.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 13008791fb3..819f48826be 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -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: