Post Coverage Comment #244
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |