Skip to content

Commit

Permalink
[TASK] Restrict scheduled CI run to main repo
Browse files Browse the repository at this point in the history
In the GitHub CI file, a scheduled run is configured, so that
the checks and tests run once a day. This is a good idea, to
change possible problems due to updated depencies early.

However, the scheduled run also runs in the forks and this
is unnecessary. The checks will run in all forks of contributors
(in case they have enabled this in general) and they will get
notifcations in case of failures. This is unnecessary, it is
enough for the scheduled runs to run in one repo.
  • Loading branch information
sypets committed Jun 4, 2023
1 parent 92c18d1 commit 61b74bc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
- cron: '10 3 * * *'
jobs:
build:
# only run jobs via scheduled workflow in main repo, not in forks
if: (github.event_name == 'schedule' && github.repository == 'lochmueller/calendarize_news') || (github.event_name != 'schedule')
strategy:
fail-fast: false
matrix:
Expand Down

0 comments on commit 61b74bc

Please sign in to comment.