Skip to content

Commit 23f8d67

Browse files
remove trigger build yml from e2e workflow
1 parent 4b97120 commit 23f8d67

File tree

1 file changed

+19
-9
lines changed

1 file changed

+19
-9
lines changed

.github/workflows/e2e.yml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,31 @@
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, release/** ]
20+
pull_request:
21+
branches: [ develop, release/** ]
22+
types: [ opened, synchronize, reopened, labeled ]
23+
workflow_dispatch:
2324

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

0 commit comments

Comments
 (0)