From f0a4cfd946f1db69ca51e259d35e44ed31730a3b Mon Sep 17 00:00:00 2001 From: Doug <6060466+pixlwave@users.noreply.github.com> Date: Fri, 10 Feb 2023 13:01:51 +0000 Subject: [PATCH] Update PR Build workflow. (#564) --- .../workflows/{release-alpha.yml => pr-build.yml} | 13 +++++-------- changelog.d/pr-564.build | 1 + 2 files changed, 6 insertions(+), 8 deletions(-) rename .github/workflows/{release-alpha.yml => pr-build.yml} (86%) create mode 100644 changelog.d/pr-564.build diff --git a/.github/workflows/release-alpha.yml b/.github/workflows/pr-build.yml similarity index 86% rename from .github/workflows/release-alpha.yml rename to .github/workflows/pr-build.yml index 2a530697d2..42e073d822 100644 --- a/.github/workflows/release-alpha.yml +++ b/.github/workflows/pr-build.yml @@ -1,17 +1,14 @@ -name: Alpha release +name: PR Build on: pull_request: - - workflow_dispatch: + types: [ labeled, synchronize, opened, reopened ] jobs: build: - # Don't run for forks as secrets are unavailable. - 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'))) + # Only run for PRs that contain the trigger label. The action will fail for forks due to + # missing secrets, but there's no need to handle this as it won't run automatically. + if: contains(github.event.pull_request.labels.*.name, 'Trigger-PR-Build') name: Release runs-on: macos-12 diff --git a/changelog.d/pr-564.build b/changelog.d/pr-564.build new file mode 100644 index 0000000000..4d565ac567 --- /dev/null +++ b/changelog.d/pr-564.build @@ -0,0 +1 @@ +Update PR Build workflow triggers. \ No newline at end of file