From 5ffe4708468a6f86f05bf9ec257074950643ec90 Mon Sep 17 00:00:00 2001 From: Ryan Maleki Date: Thu, 31 Mar 2022 14:07:40 -0700 Subject: [PATCH] Add a condition to run only on the main repo not forks --- .github/workflows/codeql-analysis.yaml | 1 + .github/workflows/deflake.yml | 3 ++- .github/workflows/nightly.yaml | 3 ++- .github/workflows/release.yaml | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql-analysis.yaml b/.github/workflows/codeql-analysis.yaml index eba1ccae1656..38f738b1b4c6 100644 --- a/.github/workflows/codeql-analysis.yaml +++ b/.github/workflows/codeql-analysis.yaml @@ -8,6 +8,7 @@ on: jobs: analyze: + if: github.repository == 'aws/karpenter' name: Analyze runs-on: ubuntu-latest permissions: diff --git a/.github/workflows/deflake.yml b/.github/workflows/deflake.yml index 84e232f3fa89..a8643797f78f 100644 --- a/.github/workflows/deflake.yml +++ b/.github/workflows/deflake.yml @@ -3,7 +3,8 @@ on: schedule: - cron: '0 12 * * *' jobs: - build: + deflake: + if: github.repository == 'aws/karpenter' runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index 7241837de44d..ae8d4be6f6da 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -5,7 +5,8 @@ on: permissions: id-token: write jobs: - build: + nightly: + if: github.repository == 'aws/karpenter' runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 48c05cc2f2f5..880142981fe5 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -4,6 +4,7 @@ on: tags: ['v*'] jobs: release: + if: github.repository == 'aws/karpenter' runs-on: ubuntu-latest steps: - uses: actions/checkout@v2