-
Notifications
You must be signed in to change notification settings - Fork 323
46 lines (39 loc) · 1.23 KB
/
testAllCI_step2.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: testReport (Comment on PR)
on:
workflow_run:
workflows: ['cobratoolboxCI (merge, test, and upload)']
types: [completed]
permissions:
contents: write
pull-requests: write
jobs:
publish-report:
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion == 'success'
steps:
- name: Download CTRF Artifact
uses: dawidd6/action-download-artifact@v8
with:
name: testReport
run_id: ${{ github.event.workflow_run.id }}
path: artifacts
- name: Download PR Number Artifact
uses: dawidd6/action-download-artifact@v8
with:
name: pr_number
run_id: ${{ github.event.workflow_run.id }}
path: pr_number
- name: Read PR Number
id: read_pr_number
run: |
PR_NUMBER=$(cat pr_number/pr_number.txt)
echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV
- name: Publish Test Report
uses: ctrf-io/[email protected]
with:
report-path: 'artifacts/ctrf-report.json'
community-report: true
community-report-name: 'cobra-report'
issue: ${{ env.PR_NUMBER }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}