Skip to content

Commit 8cf1510

Browse files
committed
Update e2e-test workflow
1 parent 6d89f3b commit 8cf1510

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

.github/workflows/e2e.yml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,29 @@
1515
name: Build e2e tests
1616

1717
on:
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

2425
jobs:
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]

0 commit comments

Comments
 (0)