Skip to content

Commit

Permalink
Merge pull request #709 from rgieseke/scheduled-action-not-on-forks
Browse files Browse the repository at this point in the history
Don't run scheduled jobs on forks
  • Loading branch information
kdorheim committed Aug 9, 2023
2 parents 8087ca7 + 0fdb129 commit 9027f1f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@ on:

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
R-CMD-check:
# Don't run scheduled job on forks, only in main repository.
if: (github.event_name == 'schedule' && github.repository == 'JGCRI/hector') || (github.event_name != 'schedule')

runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/codecov.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ name: test-coverage

jobs:
test-coverage:
# Don't run scheduled job on forks, only in main repository.
if: (github.event_name == 'schedule' && github.repository == 'JGCRI/hector') || (github.event_name != 'schedule')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/command-line.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,14 @@ on:
workflow_dispatch:

jobs:

# This workflow contains two jobs, one that builds hector on ubuntu and the second
# builds and tests Hector on macos. The purpose of this work for is to make sure that Hector
# can be built from the command line.
ubuntu:
# Don't run scheduled job on forks, only in main repository.
if: (github.event_name == 'schedule' && github.repository == 'JGCRI/hector') || (github.event_name != 'schedule')

runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
Expand Down

0 comments on commit 9027f1f

Please sign in to comment.