Skip to content

Post Coverage Comment #244

Post Coverage Comment

Post Coverage Comment #244

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