File tree Expand file tree Collapse file tree 1 file changed +19
-9
lines changed
Expand file tree Collapse file tree 1 file changed +19
-9
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, release/** ]
20+ pull_request :
21+ branches : [ develop, release/** ]
22+ types : [ opened, synchronize, reopened, labeled ]
23+ workflow_dispatch :
2324
2425jobs :
2526 build :
2627 runs-on : k8s-runner-e2e
27-
28- if : ${{ github.event.workflow_run.conclusion != 'skipped' }}
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+ )
2941
3042 steps :
31- # Pinned 1.0.0 version
32- - uses : haya14busa/action-workflow_run-status@967ed83efa565c257675ed70cfe5231f062ddd94
3343 - uses : actions/checkout@v4
3444 with :
3545 path : plugin
You can’t perform that action at this time.
0 commit comments