forked from jellyfin-archive/jellyfin-desktop-qt
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (34 loc) · 917 Bytes
/
coverage-comment.yml
File metadata and controls
37 lines (34 loc) · 917 Bytes
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
name: coverage-comment
on:
workflow_run:
workflows: [test]
types: [completed]
jobs:
comment:
if: >
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Download coverage artifact
uses: actions/download-artifact@v8
with:
name: coverage
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ github.token }}
- name: Post coverage comment
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
run: |
PR=$(cat pr_number.txt)
{
echo "## Test Coverage"
echo ""
echo '```'
cat coverage_summary.txt
echo '```'
} > comment_body.md
gh pr comment "$PR" --body-file comment_body.md