File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -227,6 +227,7 @@ jobs:
227227 outputs :
228228 run_e2e : ${{ steps.check.outputs.should_run }}
229229 steps :
230+ - uses : actions/checkout@v4
230231 - name : Check if e2e-desktop should run
231232 id : check
232233 uses : ./.github/actions/check-comment-trigger
@@ -240,7 +241,7 @@ jobs:
240241 # Runs when: main branch, [e2e] in commit, or /e2e-desktop comment on PR
241242 # ─────────────────────────────────────────────────────────────
242243 e2e-desktop :
243- needs : [build, e2e-trigger-check]
244+ needs : [e2e-trigger-check]
244245 if : needs.e2e-trigger-check.outputs.run_e2e == 'true'
245246 uses : ./.github/workflows/e2e-desktop.yml
246247 with :
Original file line number Diff line number Diff line change @@ -21,10 +21,20 @@ jobs:
2121 steps :
2222 - name : Check comment trigger
2323 id : check
24- uses : ./.github/ actions/check-comment-trigger
24+ uses : actions/github-script@v7
2525 with :
26- trigger : ' /e2e-desktop'
27- allow_workflow_dispatch : ' true'
26+ script : |
27+ const trigger = '/e2e-desktop';
28+ if (context.eventName === 'workflow_dispatch') {
29+ core.setOutput('should_run', 'true');
30+ return;
31+ }
32+ if (context.eventName === 'issue_comment' && context.payload.issue?.pull_request) {
33+ const body = context.payload.comment?.body || '';
34+ core.setOutput('should_run', body.includes(trigger) ? 'true' : 'false');
35+ return;
36+ }
37+ core.setOutput('should_run', 'false');
2838
2939 get-pr-ref :
3040 needs : check-trigger
You can’t perform that action at this time.
0 commit comments