File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree 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+ name : pr_number
23+ run_id : ${{ github.event.workflow_run.id }}
24+ path : pr_number
25+
26+ - name : Read PR Number
27+ id : read_pr_number
28+ run : |
29+ PR_NUMBER=$(cat pr_number/pr_number.txt)
30+ echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV
31+
32+ - name : Download CTRF artifact
33+ uses : dawidd6/action-download-artifact@v8
34+ with :
35+ github_token : ${{ github.token }}
36+ run_id : ${{ github.event.workflow_run.id }}
37+ name : ctrf-report
38+ path : ctrf
39+
40+ - name : Post PR Comment
41+ if : always()
42+ uses : ctrf-io/github-test-reporter@v1
43+ with :
44+ report-path : ' ctrf/**/*.json'
45+ issue : ${{ env.PR_NUMBER }}
46+
47+ summary : true
48+ pull-request : true
49+ use-suite-name : true
50+ update-comment : true
51+ always-group-by : true
52+ overwrite-comment : true
53+ upload-artifact : false
54+
55+ pull-request-report : true
56+ env :
57+ GITHUB_TOKEN : ${{ github.token }}
You can’t perform that action at this time.
0 commit comments