File tree Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Original file line number Diff line number Diff line change 8
8
- ' **.go'
9
9
- ' go.sum'
10
10
- ' go.mod'
11
+ repository_dispatch :
12
+ types : [e2e-command]
13
+
11
14
jobs :
12
15
e2e :
13
16
runs-on : ubuntu-22.04
17
+ if : ${{ github.event.ref != '' }}
18
+ steps :
19
+ - uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
20
+ with :
21
+ fetch-depth : 0
22
+ - name : Setup Go
23
+ uses : actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
24
+ with :
25
+ go-version : ' 1.22'
26
+ - name : Run tests
27
+ run : |
28
+ make e2e
29
+ # invoked by slash command workflow
30
+ e2e-slash-command :
31
+ runs-on : ubuntu-22.04
32
+ if : ${{ github.event.action == 'e2e-command' }}
14
33
steps :
15
34
- uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
35
+ with :
36
+ repository : ${{ github.event.client_payload.pull_request.head.repo.full_name }}
37
+ ref : ${{ github.event.client_payload.pull_request.head.ref }}
38
+ fetch-depth : 0
16
39
- name : Setup Go
17
40
uses : actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
18
41
with :
19
42
go-version : ' 1.22'
20
43
- name : Run tests
21
44
run : |
22
45
make e2e
46
+
Original file line number Diff line number Diff line change
1
+ name : slash-commands
2
+
3
+ on :
4
+ issue_comment :
5
+ types : [created]
6
+
7
+ jobs :
8
+ slash_command_dispatch :
9
+ runs-on : ubuntu-22.04
10
+ steps :
11
+ - name : Generate a token
12
+ id : generate-token
13
+ uses : actions/create-github-app-token@v1
14
+ with :
15
+ app-id : ${{ vars.CNOE_GH_WORKFLOW_TOKEN_APP_ID }}
16
+ private-key : ${{ secrets.CNOE_GH_WORKFLOW_TOKEN_PRIVATE_KEY }}
17
+ - name : Slash Command Dispatch
18
+ uses : peter-evans/slash-command-dispatch@v4
19
+ with :
20
+ token : ${{ steps.generate-token.outputs.token }}
21
+ commands : |
22
+ e2e
23
+ permission : write
24
+ issue-type : pull-request
You can’t perform that action at this time.
0 commit comments