From 20d1caa1aa9552346784a1301c8e4ca018e2cfac Mon Sep 17 00:00:00 2001 From: Yasumasa Suenaga Date: Fri, 5 May 2023 16:13:04 +0900 Subject: [PATCH 1/2] Skip deploy workflows in forked repos Signed-off-by: Yasumasa Suenaga --- .github/workflows/2-pre-release.yaml | 1 + .github/workflows/dev_carbon-aware-api.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/2-pre-release.yaml b/.github/workflows/2-pre-release.yaml index 631ec2488..79072b428 100644 --- a/.github/workflows/2-pre-release.yaml +++ b/.github/workflows/2-pre-release.yaml @@ -18,6 +18,7 @@ concurrency: jobs: publish-container-image: + if: github.repository == 'Green-Software-Foundation/carbon-aware-sdk' runs-on: ubuntu-latest permissions: packages: write diff --git a/.github/workflows/dev_carbon-aware-api.yml b/.github/workflows/dev_carbon-aware-api.yml index 9eb8aba88..d2786e49f 100644 --- a/.github/workflows/dev_carbon-aware-api.yml +++ b/.github/workflows/dev_carbon-aware-api.yml @@ -11,6 +11,7 @@ on: jobs: build: + if: github.repository == 'Green-Software-Foundation/carbon-aware-sdk' runs-on: windows-latest steps: From 98fa2ae7d0b85b3fc8d441c7ee02b3a5b9426000 Mon Sep 17 00:00:00 2001 From: Yasumasa Suenaga Date: Sat, 3 Jun 2023 18:15:38 +0900 Subject: [PATCH 2/2] Add vars Signed-off-by: Yasumasa Suenaga --- .github/workflows/2-pre-release.yaml | 2 +- .github/workflows/dev_carbon-aware-api.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/2-pre-release.yaml b/.github/workflows/2-pre-release.yaml index 79072b428..3335ca28c 100644 --- a/.github/workflows/2-pre-release.yaml +++ b/.github/workflows/2-pre-release.yaml @@ -18,7 +18,7 @@ concurrency: jobs: publish-container-image: - if: github.repository == 'Green-Software-Foundation/carbon-aware-sdk' + if: github.repository == 'Green-Software-Foundation/carbon-aware-sdk' || vars.ENABLE_PRERELEASE_WORKFLOW == 'true' runs-on: ubuntu-latest permissions: packages: write diff --git a/.github/workflows/dev_carbon-aware-api.yml b/.github/workflows/dev_carbon-aware-api.yml index d2786e49f..5a65d5123 100644 --- a/.github/workflows/dev_carbon-aware-api.yml +++ b/.github/workflows/dev_carbon-aware-api.yml @@ -11,7 +11,7 @@ on: jobs: build: - if: github.repository == 'Green-Software-Foundation/carbon-aware-sdk' + if: github.repository == 'Green-Software-Foundation/carbon-aware-sdk' || vars.ENABLE_WEBAPP_WORKFLOW == 'true' runs-on: windows-latest steps: