From d9d1bc8c6569fdd3e801886248f9c6480c6ca1be Mon Sep 17 00:00:00 2001 From: Thomas Koch Date: Mon, 13 Feb 2023 11:08:42 +0200 Subject: [PATCH] skip github jobs on forks I get scary emails from github about failed jobs for every commit pushed to my yacy fork. But the jobs should not run on my forked repo in the first place. This problem is not unique to yacy: https://github.com/actions/runner/issues/859 Alternatively every contributor could disable workflows in the settings of their fork repo: https://docs.github.com/en/actions/managing-workflow-runs/disabling-and-enabling-a-workflow --- .github/workflows/ant-build-pull-request.yaml | 1 + .github/workflows/ant-build-selfhosted.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/ant-build-pull-request.yaml b/.github/workflows/ant-build-pull-request.yaml index 3c6dfb0e6..08ad02649 100644 --- a/.github/workflows/ant-build-pull-request.yaml +++ b/.github/workflows/ant-build-pull-request.yaml @@ -5,6 +5,7 @@ on: pull_request jobs: build: runs-on: ubuntu-latest + if: "github.repository == 'yacy/yacy_search_server' steps: - uses: actions/checkout@master - name: Set up JDK 8 diff --git a/.github/workflows/ant-build-selfhosted.yaml b/.github/workflows/ant-build-selfhosted.yaml index a48137e3a..e97884679 100644 --- a/.github/workflows/ant-build-selfhosted.yaml +++ b/.github/workflows/ant-build-selfhosted.yaml @@ -5,6 +5,7 @@ on: push jobs: build: runs-on: self-hosted + if: "github.repository == 'yacy/yacy_search_server' steps: - uses: actions/checkout@master - name: Set up JDK 8