File tree Expand file tree Collapse file tree 2 files changed +69
-18
lines changed
Expand file tree Collapse file tree 2 files changed +69
-18
lines changed Original file line number Diff line number Diff line change @@ -144,7 +144,6 @@ jobs:
144144 done
145145 echo "Processed $conv TRX file(s)"
146146
147-
148147 - name : Publish Test Report
149148 if : always()
150149 uses : ctrf-io/github-test-reporter@v1
@@ -186,24 +185,18 @@ jobs:
186185 env :
187186 GITHUB_TOKEN : ${{ github.token }}
188187
188+ - name : Save PR Number
189+ run : echo "PR_NUMBER=${{ github.event.pull_request.number }}" >> $GITHUB_ENV
189190
190- - name : Create PR Comment
191- if : always()
192- uses : ctrf-io/github-test-reporter@v1
193- with :
194- report-path : ' ctrf/**/*.json'
195-
196- summary : true
197- pull-request : true
198- use-suite-name : true
199- update-comment : true
200- always-group-by : true
201- overwrite-comment : true
202- upload-artifact : false
191+ - name : Upload PR Number as Artifact
192+ run : echo $PR_NUMBER > pr_number.txt
193+ shell : bash
203194
204- pull-request-report : true
205- env :
206- GITHUB_TOKEN : ${{ github.token }}
195+ - name : Upload PR Number Artifact
196+ uses : actions/upload-artifact@v4
197+ with :
198+ name : pr_number
199+ path : pr_number.txt
207200
208201 - name : Summary
209- run : echo "All matrix test jobs completed."
202+ run : echo "All matrix test jobs completed."
Original file line number Diff line number Diff line change 1+ name : Create PR Comments
2+
3+ on :
4+ workflow_run :
5+ workflows : ["Tests"]
6+ types : [completed]
7+
8+ permissions :
9+ contents : read
10+ actions : read
11+ pull-requests : write
12+
13+ jobs :
14+ pr-comment :
15+ name : Post Test Result as PR comment
16+ runs-on : ubuntu-24.04
17+
18+ steps :
19+ - name : Download PR number artifact
20+ uses : dawidd6/action-download-artifact@v8
21+ with :
22+ github_token : ${{ github.token }}
23+ run_id : ${{ github.event.workflow_run.id }}
24+ name : pr-number
25+ path : pr-number
26+
27+ - name : Read PR Number
28+ id : read_pr_number
29+ run : |
30+ PR_NUMBER=$(cat pr_number/pr_number.txt)
31+ echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV
32+
33+ - name : Download CTRF artifact
34+ uses : dawidd6/action-download-artifact@v8
35+ with :
36+ github_token : ${{ github.token }}
37+ run_id : ${{ github.event.workflow_run.id }}
38+ name : ctrf-report
39+ path : ctrf
40+
41+ - name : Post PR Comment
42+ if : always()
43+ uses : ctrf-io/github-test-reporter@v1
44+ with :
45+ report-path : ' ctrf/**/*.json'
46+ issue : ${{ env.PR_NUMBER }}
47+
48+ summary : true
49+ pull-request : true
50+ use-suite-name : true
51+ update-comment : true
52+ always-group-by : true
53+ overwrite-comment : true
54+ upload-artifact : false
55+
56+ pull-request-report : true
57+ env :
58+ GITHUB_TOKEN : ${{ github.token }}
You can’t perform that action at this time.
0 commit comments