Run scheduled workflows only in the home-assistant organization (#64085)

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
Sebastian Lövdahl 2022-01-20 13:54:54 +02:00 committed by GitHub
parent 09297520c0
commit bb671830a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 2 deletions

View File

@ -15,6 +15,7 @@ env:
jobs: jobs:
init: init:
name: Initialize build name: Initialize build
if: github.repository_owner == 'home-assistant'
runs-on: ubuntu-latest runs-on: ubuntu-latest
outputs: outputs:
architectures: ${{ steps.info.outputs.architectures }} architectures: ${{ steps.info.outputs.architectures }}
@ -62,7 +63,7 @@ jobs:
name: Build PyPi package name: Build PyPi package
needs: init needs: init
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: needs.init.outputs.publish == 'true' if: github.repository_owner == 'home-assistant' && needs.init.outputs.publish == 'true'
steps: steps:
- name: Checkout the repository - name: Checkout the repository
uses: actions/checkout@v2.4.0 uses: actions/checkout@v2.4.0
@ -88,6 +89,7 @@ jobs:
build_base: build_base:
name: Build ${{ matrix.arch }} base core image name: Build ${{ matrix.arch }} base core image
if: github.repository_owner == 'home-assistant'
needs: init needs: init
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
@ -143,6 +145,7 @@ jobs:
build_machine: build_machine:
name: Build ${{ matrix.machine }} machine core image name: Build ${{ matrix.machine }} machine core image
if: github.repository_owner == 'home-assistant'
needs: ["init", "build_base"] needs: ["init", "build_base"]
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
@ -206,6 +209,7 @@ jobs:
publish_ha: publish_ha:
name: Publish version files name: Publish version files
if: github.repository_owner == 'home-assistant'
needs: ["init", "build_machine"] needs: ["init", "build_machine"]
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@ -238,6 +242,7 @@ jobs:
publish_container: publish_container:
name: Publish meta container name: Publish meta container
if: github.repository_owner == 'home-assistant'
needs: ["init", "build_base"] needs: ["init", "build_base"]
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:

View File

@ -7,6 +7,7 @@ on:
jobs: jobs:
lock: lock:
if: github.repository_owner == 'home-assistant'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: dessant/lock-threads@v3 - uses: dessant/lock-threads@v3

View File

@ -17,6 +17,7 @@ env:
jobs: jobs:
upload: upload:
name: Upload name: Upload
if: github.repository_owner == 'home-assistant'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout the repository - name: Checkout the repository
@ -35,7 +36,7 @@ jobs:
download: download:
name: Download name: Download
needs: upload 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 runs-on: ubuntu-latest
steps: steps:
- name: Checkout the repository - name: Checkout the repository

View File

@ -16,6 +16,7 @@ on:
jobs: jobs:
init: init:
name: Initialize wheels builder name: Initialize wheels builder
if: github.repository_owner == 'home-assistant'
runs-on: ubuntu-latest runs-on: ubuntu-latest
outputs: outputs:
architectures: ${{ steps.info.outputs.architectures }} architectures: ${{ steps.info.outputs.architectures }}
@ -62,6 +63,7 @@ jobs:
core: core:
name: Build wheels with ${{ matrix.tag }} (${{ matrix.arch }}) for core name: Build wheels with ${{ matrix.tag }} (${{ matrix.arch }}) for core
if: github.repository_owner == 'home-assistant'
needs: init needs: init
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
@ -102,6 +104,7 @@ jobs:
integrations: integrations:
name: Build wheels with ${{ matrix.tag }} (${{ matrix.arch }}) for integrations name: Build wheels with ${{ matrix.tag }} (${{ matrix.arch }}) for integrations
if: github.repository_owner == 'home-assistant'
needs: init needs: init
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy: