From c15867595bf21828f51afe830b97686e53708175 Mon Sep 17 00:00:00 2001 From: Michel Hidalgo Date: Fri, 20 Dec 2024 17:22:19 -0300 Subject: [PATCH] Disable weekly CI jobs in forks (#455) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### Proposed changes It has been recently brought to my attention that our weekly CI jobs are getting run in fork repositories. Users may inadvertently end up in this scenario if they enable GHA workflows on their forks, see https://github.com/orgs/community/discussions/26704. While I do think it makes sense for plain CI jobs to be available to forks if the owners chooses to, weekly CI jobs seem like a waste of compute. This patch ensures those jobs only run for this repository. #### Type of change - [x] 🐛 Bugfix (change which fixes an issue) - [ ] 🚀 Feature (change which adds functionality) - [ ] 📚 Documentation (change which fixes or extends documentation) ### Checklist - [x] Lint and unit tests (if any) pass locally with my changes - [x] I have added tests that prove my fix is effective or that my feature works - [x] I have added necessary documentation (if appropriate) - [x] All commits have been signed for [DCO](https://developercertificate.org/) Signed-off-by: Michel Hidalgo --- .github/workflows/docker_ci_pipeline.yml | 1 + .github/workflows/weekly_pipeline.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/docker_ci_pipeline.yml b/.github/workflows/docker_ci_pipeline.yml index 635a09a76..08a9d1b04 100644 --- a/.github/workflows/docker_ci_pipeline.yml +++ b/.github/workflows/docker_ci_pipeline.yml @@ -16,6 +16,7 @@ on: jobs: build-image: + if: github.repository == 'Ekumen-OS/beluga' runs-on: ubuntu-latest strategy: fail-fast: false diff --git a/.github/workflows/weekly_pipeline.yml b/.github/workflows/weekly_pipeline.yml index 841c4ed83..ed74aa72f 100644 --- a/.github/workflows/weekly_pipeline.yml +++ b/.github/workflows/weekly_pipeline.yml @@ -16,6 +16,7 @@ concurrency: jobs: build-test: + if: github.repository == 'Ekumen-OS/beluga' runs-on: ubuntu-latest strategy: fail-fast: false