From 61b74bc6ddc70e372eed2d943292fbc7a73aeeda Mon Sep 17 00:00:00 2001 From: Sybille Peters Date: Sun, 4 Jun 2023 11:37:18 +0200 Subject: [PATCH] [TASK] Restrict scheduled CI run to main repo 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. --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 49dbf92..c38c95f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: