From 0221ad54a049e5a1c436f46eb611ad948c9f0505 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 25 Sep 2024 08:48:18 +0200 Subject: [PATCH] ci: skip the scheduled workflows in forked repositories The idea of the scheduled workflows is to keep the actual https://git-scm.com/ site up to date. To do that, commits are added to the branch as needed. Doing this in fork repositories makes little sense, as these commits will necessarily diverge from the `gh-pages` branch of https://github.com/git/git-scm.com/. So let's not run them in forks. Note: To allow for improving said workflows, manually triggered runs will still do the work as intended. Signed-off-by: Johannes Schindelin --- .github/workflows/update-book.yml | 1 + .github/workflows/update-download-data.yml | 1 + .github/workflows/update-git-version-and-manual-pages.yml | 1 + .github/workflows/update-translated-manual-pages.yml | 1 + 4 files changed, 4 insertions(+) diff --git a/.github/workflows/update-book.yml b/.github/workflows/update-book.yml index 4ffa47a3c8..fd8f7458fa 100644 --- a/.github/workflows/update-book.yml +++ b/.github/workflows/update-book.yml @@ -13,6 +13,7 @@ on: jobs: check-for-updates: + if: github.event.repository.fork == false || github.event_name == 'workflow_dispatch' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/update-download-data.yml b/.github/workflows/update-download-data.yml index 000ca7bf32..f5738717bb 100644 --- a/.github/workflows/update-download-data.yml +++ b/.github/workflows/update-download-data.yml @@ -8,6 +8,7 @@ on: jobs: update-download-data: + if: github.event.repository.fork == false || github.event_name == 'workflow_dispatch' runs-on: ubuntu-latest permissions: contents: write # to push changes (if any) diff --git a/.github/workflows/update-git-version-and-manual-pages.yml b/.github/workflows/update-git-version-and-manual-pages.yml index 714033d58d..7a03ab65ed 100644 --- a/.github/workflows/update-git-version-and-manual-pages.yml +++ b/.github/workflows/update-git-version-and-manual-pages.yml @@ -13,6 +13,7 @@ on: jobs: update-git-version-and-manual-pages: + if: github.event.repository.fork == false || github.event_name == 'workflow_dispatch' runs-on: ubuntu-latest permissions: contents: write # to push changes (if any) diff --git a/.github/workflows/update-translated-manual-pages.yml b/.github/workflows/update-translated-manual-pages.yml index c77c09d964..8293c7f637 100644 --- a/.github/workflows/update-translated-manual-pages.yml +++ b/.github/workflows/update-translated-manual-pages.yml @@ -13,6 +13,7 @@ on: jobs: check-for-updates: + if: github.event.repository.fork == false || github.event_name == 'workflow_dispatch' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4