Skip to content

Commit 50a8998

Browse files
authored
Only rebuild PRs on specific labels (#15100)
1 parent b4e00bc commit 50a8998

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

.github/workflows/build-pull-request.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ name: Build pull request
33
on:
44
pull_request:
55
types:
6-
- labeled
76
- opened
87
- synchronize
98
- reopened
9+
# called from rebuild-pull-request-on-label.yml
10+
workflow_call:
1011

1112
concurrency:
1213
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Build on test labels
2+
3+
on:
4+
pull_request:
5+
types:
6+
- labeled
7+
- unlabeled
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
trigger-build:
14+
# Only run if one of the test labels was added
15+
if: |
16+
github.event.label.name == 'test openj9' ||
17+
github.event.label.name == 'test windows' ||
18+
github.event.label.name == 'test native'
19+
uses: ./.github/workflows/build-pull-request.yml

0 commit comments

Comments
 (0)