From bb671830a6b9e6585d6824db8f03cbf084810262 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20L=C3=B6vdahl?= Date: Thu, 20 Jan 2022 13:54:54 +0200 Subject: [PATCH] Run scheduled workflows only in the home-assistant organization (#64085) Co-authored-by: Franck Nijhof --- .github/workflows/builder.yml | 7 ++++++- .github/workflows/lock.yml | 1 + .github/workflows/translations.yaml | 3 ++- .github/workflows/wheels.yml | 3 +++ 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/builder.yml b/.github/workflows/builder.yml index a797462a884..89c4d02c942 100644 --- a/.github/workflows/builder.yml +++ b/.github/workflows/builder.yml @@ -15,6 +15,7 @@ env: jobs: init: name: Initialize build + if: github.repository_owner == 'home-assistant' runs-on: ubuntu-latest outputs: architectures: ${{ steps.info.outputs.architectures }} @@ -62,7 +63,7 @@ jobs: name: Build PyPi package needs: init runs-on: ubuntu-latest - if: needs.init.outputs.publish == 'true' + if: github.repository_owner == 'home-assistant' && needs.init.outputs.publish == 'true' steps: - name: Checkout the repository uses: actions/checkout@v2.4.0 @@ -88,6 +89,7 @@ jobs: build_base: name: Build ${{ matrix.arch }} base core image + if: github.repository_owner == 'home-assistant' needs: init runs-on: ubuntu-latest strategy: @@ -143,6 +145,7 @@ jobs: build_machine: name: Build ${{ matrix.machine }} machine core image + if: github.repository_owner == 'home-assistant' needs: ["init", "build_base"] runs-on: ubuntu-latest strategy: @@ -206,6 +209,7 @@ jobs: publish_ha: name: Publish version files + if: github.repository_owner == 'home-assistant' needs: ["init", "build_machine"] runs-on: ubuntu-latest steps: @@ -238,6 +242,7 @@ jobs: publish_container: name: Publish meta container + if: github.repository_owner == 'home-assistant' needs: ["init", "build_base"] runs-on: ubuntu-latest steps: diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml index 6be819f9b82..64b7a2cd8e3 100644 --- a/.github/workflows/lock.yml +++ b/.github/workflows/lock.yml @@ -7,6 +7,7 @@ on: jobs: lock: + if: github.repository_owner == 'home-assistant' runs-on: ubuntu-latest steps: - uses: dessant/lock-threads@v3 diff --git a/.github/workflows/translations.yaml b/.github/workflows/translations.yaml index 2ef5ded0b59..e9badfc0479 100644 --- a/.github/workflows/translations.yaml +++ b/.github/workflows/translations.yaml @@ -17,6 +17,7 @@ env: jobs: upload: name: Upload + if: github.repository_owner == 'home-assistant' runs-on: ubuntu-latest steps: - name: Checkout the repository @@ -35,7 +36,7 @@ jobs: download: name: Download needs: upload - if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' + if: github.repository_owner == 'home-assistant' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') runs-on: ubuntu-latest steps: - name: Checkout the repository diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 3ecba62be14..815854f04a9 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -16,6 +16,7 @@ on: jobs: init: name: Initialize wheels builder + if: github.repository_owner == 'home-assistant' runs-on: ubuntu-latest outputs: architectures: ${{ steps.info.outputs.architectures }} @@ -62,6 +63,7 @@ jobs: core: name: Build wheels with ${{ matrix.tag }} (${{ matrix.arch }}) for core + if: github.repository_owner == 'home-assistant' needs: init runs-on: ubuntu-latest strategy: @@ -102,6 +104,7 @@ jobs: integrations: name: Build wheels with ${{ matrix.tag }} (${{ matrix.arch }}) for integrations + if: github.repository_owner == 'home-assistant' needs: init runs-on: ubuntu-latest strategy: