16
16
description : ' Target branch to run E2E tests over'
17
17
required : true
18
18
default : ' main'
19
+ e2e-test-command :
20
+ description : ' Command used for launching E2E tests'
21
+ required : true
22
+ default : ' /run e2e'
19
23
20
24
permissions :
21
25
checks : write
34
38
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
35
39
- name : Get e2e test target
36
40
env :
37
- PR_COMMENT : ${{ github.event.comment.body }}
41
+ PR_COMMENT : ${{ github.event.inputs.e2e-test-command }}
38
42
id : get-e2e-target
39
- if : startsWith(github.event.comment.body , '/run e2e')
43
+ if : startsWith(github.event.inputs.e2e-test-command , '/run e2e')
40
44
run : |
41
45
target=$(echo $PR_COMMENT | cut -d " " -f 3)
42
46
if [ -n "${target}" ]; then
65
69
runs-on :
66
70
- self-hosted
67
71
- operator-e2e
68
- if : ${{ !contains(github.event.comment.html_url, '/pull/') }}
72
+ if : ${{ !contains(github.event.comment.html_url, '/pull/') || github.event.inputs.e2e-test-command != '' }}
69
73
steps :
70
74
- name : Checkout
71
75
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -106,15 +110,15 @@ jobs:
106
110
environment : E2E
107
111
needs : [ "run-in-k8s", "run-in-ocp" ]
108
112
runs-on : ubuntu-latest
109
- if : startsWith(github.event.comment.body , '/run e2e') || contains(github.event.pull_request.labels.*.name, 'e2e test')
113
+ if : startsWith(github.event.inputs.e2e-test-command , '/run e2e') || contains(github.event.pull_request.labels.*.name, 'e2e test')
110
114
steps :
111
115
- uses : actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
112
116
with :
113
117
script : |
114
118
github.rest.issues.createComment({
115
119
owner: context.repo.owner,
116
120
repo: context.repo.repo,
117
- issue_number: context.issue.number ,
121
+ issue_number: 4773 ,
118
122
body: '# E2E test results\n' +
119
123
'See ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}'
120
124
})
@@ -126,7 +130,7 @@ jobs:
126
130
comment_id: context.payload.comment.id,
127
131
content: 'hooray'
128
132
})
129
- } else {
133
+ } else if (context.payload.label) {
130
134
github.rest.issues.removeLabel({
131
135
owner: context.repo.owner,
132
136
repo: context.repo.repo,
0 commit comments