From b3cb7752a456f18eb559f759cba35dd6cb82eb8e Mon Sep 17 00:00:00 2001 From: Ralf Gommers Date: Thu, 4 Feb 2021 22:42:40 +0100 Subject: CI: fix when GitHub Actions builds trigger, and allow ci skips Similar to what SciPy does. Right now, it triggers even on pushes to branches on forks, which is useless and generates lots of notifications on failures and wasted resources if no failures. --- .github/workflows/build_test.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to '.github') diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index ce0c492e6..1363d9327 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -1,6 +1,14 @@ name: Build_Test -on: [push, pull_request] +on: + push: + branches: + - master + - maintenance/** + pull_request: + branches: + - master + - maintenance/** defaults: run: @@ -12,6 +20,7 @@ env: jobs: smoke_test: + if: "github.repository == 'numpy/numpy' && !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip github]')" runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 -- cgit v1.2.1