From e205cdedd59a894bf53a0e3201b3000fdbf7bf59 Mon Sep 17 00:00:00 2001 From: Anurag <81210977+kranurag7@users.noreply.github.com> Date: Mon, 23 Oct 2023 00:14:19 +0530 Subject: [PATCH] update workflows to run only on upstream repo this commit enables few workflows to run only on upstream repo and disables it on forked repos. fixes #554 Signed-off-by: Anurag <81210977+kranurag7@users.noreply.github.com> --- .github/workflows/schedule-cache-cleaner-caph-image.yml | 1 + .github/workflows/schedule-link-checker.yml | 1 + .github/workflows/schedule-scan-image.yml | 1 + 3 files changed, 3 insertions(+) diff --git a/.github/workflows/schedule-cache-cleaner-caph-image.yml b/.github/workflows/schedule-cache-cleaner-caph-image.yml index 91f36b539..4e890ffa8 100644 --- a/.github/workflows/schedule-cache-cleaner-caph-image.yml +++ b/.github/workflows/schedule-cache-cleaner-caph-image.yml @@ -12,6 +12,7 @@ concurrency: jobs: cache-cleaner: runs-on: ubuntu-22.04 + if: github.repository == 'syself/cluster-api-provider-hetzner' steps: # Load Golang cache build from GitHub - name: Load Caph Golang cache build from GitHub diff --git a/.github/workflows/schedule-link-checker.yml b/.github/workflows/schedule-link-checker.yml index 8036a9831..e2eb96391 100644 --- a/.github/workflows/schedule-link-checker.yml +++ b/.github/workflows/schedule-link-checker.yml @@ -8,6 +8,7 @@ jobs: link-checker: name: Link Checker runs-on: ubuntu-latest + if: github.repository == 'syself/cluster-api-provider-hetzner' steps: - name: Checkout uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 diff --git a/.github/workflows/schedule-scan-image.yml b/.github/workflows/schedule-scan-image.yml index fcd9d6107..1b7faa42a 100644 --- a/.github/workflows/schedule-scan-image.yml +++ b/.github/workflows/schedule-scan-image.yml @@ -8,6 +8,7 @@ jobs: scan: name: Trivy runs-on: ubuntu-latest + if: github.repository == 'syself/cluster-api-provider-hetzner' container: image: ghcr.io/syself/caph-builder:1.0.10 credentials: