JGCRI / hector

The Hector Simple Climate Model
http://jgcri.github.io/hector/
GNU General Public License v3.0
107 stars 45 forks source link

Scheduled Actions shouldn't run on forks #708

Closed rgieseke closed 10 months ago

rgieseke commented 1 year ago

I received a notification for a failed scheduled R-CMD build (missed cache or something).

https://github.com/rgieseke/hector/actions/runs/5429536022/jobs/9874618289#step:18:3012

It ran on the main origin repository without problem it seems.

I found a proposed solution to run scheduled actions only in the main repo: https://github.com/orgs/community/discussions/26684

Jobs:
  build:
    if: (github.event_name == 'schedule' && github.repository == 'main_org/main_repo') || (github.event_name != 'schedule')
    . . .

This should save some computing cycles and duplicate notifications, as everyone who should be notified by a broken schedule job is likely subscribed to this repo.