-
Notifications
You must be signed in to change notification settings - Fork 3
36 lines (31 loc) · 942 Bytes
/
coverage-comment.yml
File metadata and controls
36 lines (31 loc) · 942 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
name: Post Coverage Comment
on:
workflow_run:
# Must match the 'name' key in ci.yml exactly
workflows: ["CI/Test"]
types:
- completed
permissions:
pull-requests: write
jobs:
comment:
runs-on: ubuntu-latest
if: >
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success'
steps:
- name: Download Coverage Artifact
uses: actions/download-artifact@v8
with:
name: coverage-artifact
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Read PR Number
id: pr
run: echo "number=$(cat pr_number.txt)" >> $GITHUB_OUTPUT
- name: Post Coverage Comment
uses: marocchino/sticky-pull-request-comment@v3
with:
number: ${{ steps.pr.outputs.number }}
path: coverage_comment.txt
header: coverage