1
1
name : Integration Tests
2
2
on :
3
- repository_dispatch :
4
- types : [integration-check]
3
+ workflow_dispatch :
4
+ inputs :
5
+ checkRunId :
6
+ description : " ID for the Check Run in a PR"
7
+ type : string
8
+
5
9
jobs :
6
10
myEvent :
7
11
runs-on : ubuntu-latest
8
12
steps :
9
- # ###################################################
10
- # Update the status to show that the queued message
11
- # was received and is being processed
12
- # ###################################################
13
13
- name : Acknowledge Request
14
14
env :
15
15
GH_TOKEN : ${{ github.token }}
16
16
run : |
17
17
gh api -X PATCH -H "Accept: application/vnd.github+json" \
18
18
-H "X-GitHub-Api-Version: 2022-11-28" \
19
19
-f 'status=in_progress' \
20
- -f 'output[title]=Integration Tests' \
21
- -f 'output[summary]=Running Integration Tests for Py SDK' \
22
- /repos/${{ github.repository }}/check-runs/${{ github.event.client_payload .checkRunId }}
20
+ -f 'output[title]=Run Integration Tests' \
21
+ -f 'output[summary]=Running Integration Tests for Java SDK' \
22
+ /repos/${{ github.repository }}/check-runs/${{ github.event.inputs .checkRunId }}
23
23
24
24
# ###################################################
25
25
# Actually, we'll just sleep to simulate some work
26
26
# ###################################################
27
27
- name : Processing
28
28
run : sleep 10
29
29
30
- # ####################################################
31
- # Send a final message to complete the run and
32
- # provide any final updates. Doing this one in JSON
33
- # to make it more readable. This approach can also
34
- # be used to get total control over the serialized
35
- # data types (for example, integers).
36
- # ####################################################
37
30
- name : Complete Check
38
31
env :
39
32
GH_TOKEN : ${{ github.token }}
40
33
run : |
41
34
gh api -X PATCH -H "Accept: application/vnd.github+json" \
42
35
-H "X-GitHub-Api-Version: 2022-11-28" \
43
- /repos/${{ github.repository }}/check-runs/${{ github.event.client_payload .checkRunId }} \
36
+ /repos/${{ github.repository }}/check-runs/${{ github.event.inputs .checkRunId }} \
44
37
--input - <<- EOF
45
38
{
46
39
"conclusion": "success",
47
- "details_url": "TODO",
48
40
"output": {
49
- "title": "Integration Tests",
50
- "summary": "**Summary**: The run completed.",
51
- "text": "Everything worked as expected."
41
+ "title": "Run Integration Tests",
42
+ "summary": "Successful execution of Integration Tests for Java SDK"
52
43
}
53
44
}
54
45
EOF
0 commit comments