Skip to content

Commit

Permalink
[INFRA] Prevent Actions workflows from running on people's forks (#3900)
Browse files Browse the repository at this point in the history
* Prevent CI workflows from running on forks

* Leave for short workflows

* Update .github/workflows/isort.yml

* Missed some in testing.yml

---------

Co-authored-by: Remi Gau <remi_gau@hotmail.com>
  • Loading branch information
ymzayek and Remi-Gau committed Aug 10, 2023
1 parent 4572d65 commit 87efd91
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
# Make citation metadata from CITATION.cff is valid.
# as it is used in the documentation build.
validate_cff:
if: github.repository == 'nilearn/nilearn'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/detect_test_pollution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ jobs:

latest:

if: github.repository == 'nilearn/nilearn'

runs-on: ubuntu-latest

steps:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:

jobs:
min_requirements:
if: github.repository == 'nilearn/nilearn'
runs-on: ubuntu-20.04
name: Python 3.7, minimal requirements without Matplotlib
defaults:
Expand Down Expand Up @@ -41,6 +42,7 @@ jobs:
name: Upload coverage to CodeCov

min_requirements_matplotlib:
if: github.repository == 'nilearn/nilearn'
runs-on: ubuntu-20.04
name: Python 3.7, minimal requirements with Matplotlib
defaults:
Expand Down Expand Up @@ -69,6 +71,7 @@ jobs:
name: Run tests

latest:
if: github.repository == 'nilearn/nilearn'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -107,6 +110,7 @@ jobs:
name: Upload coverage to CodeCov

prerelease:
if: github.repository == 'nilearn/nilearn'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/testing_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ concurrency:

jobs:
test_install:
if: github.repository == 'nilearn/nilearn'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/update_authors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ concurrency:

jobs:
update_authors:
if: github.repository == 'nilearn/nilearn'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down

0 comments on commit 87efd91

Please sign in to comment.