Skip to content

Commit

Permalink
Disable GHA workflows on non-SciTools branches (#4444)
Browse files Browse the repository at this point in the history
* Prevent automatic refresh lockfiles

* Include stale and benchmark checks

* Move within individual jobs

* Catch one in stale.yml too

* Reverted a newline and added whatsnew
  • Loading branch information
wjbenfold authored Dec 1, 2021
1 parent beba8f2 commit 63ec393
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:

jobs:
benchmark:
if: "github.repository == 'SciTools/iris'"
runs-on: ubuntu-latest

env:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/refresh-lockfiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ on:
jobs:

no_clobber:
if: "github.repository == 'SciTools/iris'"
runs-on: ubuntu-latest
steps:
# check if the auto-update-lockfiles branch exists. If it does, and someone other than
Expand Down Expand Up @@ -64,6 +65,7 @@ jobs:
# this list below should be changed when covering more python versions
# TODO: generate this matrix automatically from the list of available py**.yml files
# ref: https://tomasvotruba.com/blog/2020/11/16/how-to-make-dynamic-matrix-in-github-actions/
if: "github.repository == 'SciTools/iris'"
runs-on: ubuntu-latest
needs: no_clobber

Expand All @@ -89,6 +91,7 @@ jobs:
create_pr:
# once the matrix job has completed all the lock files will have been uploaded as artifacts.
# Download the artifacts, add them to the repo, and create a PR.
if: "github.repository == 'SciTools/iris'"
runs-on: ubuntu-latest
needs: gen_lockfiles

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

jobs:
stale:
if: "github.repository == 'SciTools/iris'"
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v4.0.0
Expand Down
3 changes: 3 additions & 0 deletions docs/src/whatsnew/latest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,9 @@ This document explains the changes made to Iris for this release
`dask-core` in testing environments reducing the number of dependencies
installed for testing. (:pull:`4434`)

#. `@wjbenfold`_ prevented github action runs in forks (:issue:`4441`,
:pull:`4444`)

.. comment
Whatsnew author names (@github name) in alphabetical order. Note that,
core dev names are automatically included by the common_links.inc:
Expand Down

0 comments on commit 63ec393

Please sign in to comment.