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 2a530697d..42e073d82 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 000000000..4d565ac56 --- /dev/null +++ b/changelog.d/pr-564.build @@ -0,0 +1 @@ +Update PR Build workflow triggers. \ No newline at end of file