File tree Expand file tree Collapse file tree 1 file changed +19
-5
lines changed
Expand file tree Collapse file tree 1 file changed +19
-5
lines changed Original file line number Diff line number Diff line change 1515name : Build e2e tests
1616
1717on :
18- workflow_run :
19- workflows :
20- - Trigger build
21- types :
22- - completed
18+ push :
19+ branches : [ develop ]
20+ pull_request :
21+ branches : [ develop ]
22+ types : [ opened, synchronize, reopened, labeled ]
23+ workflow_dispatch :
2324
2425jobs :
2526 build :
2627 runs-on : k8s-runner-e2e
28+ # We allow builds:
29+ # 1) When triggered manually
30+ # 2) When it's a merge into a branch
31+ # 3) For PRs that are labeled as build and
32+ # - It's a code change
33+ # - A build label was just added
34+ # A bit complex, but prevents builds when other labels are manipulated
35+ if : >
36+ github.event_name == 'workflow_dispatch'
37+ || github.event_name == 'push'
38+ || (contains(github.event.pull_request.labels.*.name, 'build')
39+ && (github.event.action != 'labeled' || github.event.label.name == 'build')
40+ )
2741 strategy :
2842 matrix :
2943 module : [mysql-plugin, postgresql-plugin]
You can’t perform that action at this time.
0 commit comments