From 49ee365a5ee0c88fc4c25da5de59e15c65ea0a2e Mon Sep 17 00:00:00 2001 From: Stefan Ceriu Date: Fri, 14 Oct 2022 14:27:47 +0300 Subject: [PATCH] Only build alpha builds when PR labelled as `Trigger-PR-Build` --- .github/workflows/release-alpha.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-alpha.yml b/.github/workflows/release-alpha.yml index 294a7bd85..cfe3e87af 100644 --- a/.github/workflows/release-alpha.yml +++ b/.github/workflows/release-alpha.yml @@ -1,17 +1,19 @@ name: Alpha release on: - - # Triggers the workflow on any pull request pull_request: + types: [ labeled, synchronized, opened, reopened ] - # Allows you to run this workflow manually from the Actions tab workflow_dispatch: jobs: build: # Don't run for forks as secrets are unavailable. - if: github.event.pull_request.head.repo.full_name == github.repository + if: | + github.event.pull_request.head.repo.full_name == github.repository && + (github.event_name == 'push' || + (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'Trigger-PR-Build'))) + name: Release runs-on: macos-12