From a481bf1b537e6b9294f7c1a4d5ed95f9675523e2 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Thu, 30 Mar 2023 22:55:03 +0100 Subject: [PATCH] Tools: Trying to prevent CI from running on forks --- .github/workflows/build-android.yml | 2 ++ .github/workflows/cla.yml | 1 + .github/workflows/close-stale-issues.yml | 1 + .github/workflows/github-actions-main.yml | 3 +++ 4 files changed, 7 insertions(+) diff --git a/.github/workflows/build-android.yml b/.github/workflows/build-android.yml index 168221565..d0058b95d 100644 --- a/.github/workflows/build-android.yml +++ b/.github/workflows/build-android.yml @@ -6,6 +6,7 @@ on: [push, pull_request] jobs: pre_job: + if: github.repository == 'laurent22/joplin' runs-on: ubuntu-latest outputs: should_skip: ${{ steps.skip_check.outputs.should_skip }} @@ -16,6 +17,7 @@ jobs: concurrent_skipping: 'same_content_newer' BuildAndroidDebug: + if: github.repository == 'laurent22/joplin' needs: pre_job if: needs.pre_job.outputs.should_skip != 'true' runs-on: ubuntu-latest diff --git a/.github/workflows/cla.yml b/.github/workflows/cla.yml index 4ad059fcb..96a902770 100644 --- a/.github/workflows/cla.yml +++ b/.github/workflows/cla.yml @@ -7,6 +7,7 @@ on: jobs: CLAAssistant: + if: github.repository == 'laurent22/joplin' runs-on: ubuntu-latest steps: - name: "CLA Assistant" diff --git a/.github/workflows/close-stale-issues.yml b/.github/workflows/close-stale-issues.yml index e44847c66..8d5a73e35 100644 --- a/.github/workflows/close-stale-issues.yml +++ b/.github/workflows/close-stale-issues.yml @@ -6,6 +6,7 @@ permissions: issues: write jobs: ProcessStaleIssues: + if: github.repository == 'laurent22/joplin' runs-on: ubuntu-latest steps: - uses: actions/stale@v4 diff --git a/.github/workflows/github-actions-main.yml b/.github/workflows/github-actions-main.yml index 10bf4bb82..107c19f2d 100644 --- a/.github/workflows/github-actions-main.yml +++ b/.github/workflows/github-actions-main.yml @@ -2,6 +2,7 @@ name: Joplin Continuous Integration on: [push, pull_request] jobs: pre_job: + if: github.repository == 'laurent22/joplin' runs-on: ubuntu-latest outputs: should_skip: ${{ steps.skip_check.outputs.should_skip }} @@ -12,6 +13,7 @@ jobs: concurrent_skipping: 'same_content_newer' Main: + if: github.repository == 'laurent22/joplin' needs: pre_job # We always process server or desktop release tags, because they also publish the release if: needs.pre_job.outputs.should_skip != 'true' || startsWith(github.ref, 'refs/tags/server-v') || startsWith(github.ref, 'refs/tags/v') @@ -128,6 +130,7 @@ jobs: yarn install && cd packages/app-desktop && yarn run dist --publish=never ServerDockerImage: + if: github.repository == 'laurent22/joplin' needs: pre_job if: needs.pre_job.outputs.should_skip != 'true' runs-on: ${{ matrix.os }}