Comment on the pull request #20
This file contains 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: Comment on the pull request | |
on: | |
workflow_run: | |
workflows: ["Main CI Workflow"] | |
types: | |
- completed | |
jobs: | |
comment: | |
permissions: | |
contents: read # to read from the repo | |
pull-requests: write # to create or update comment | |
actions: read # to download artifact | |
runs-on: ubuntu-latest | |
if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' }} | |
steps: | |
- name: Download artifact | |
uses: dawidd6/action-download-artifact@v2 | |
with: | |
workflow: ${{ github.event.workflow_run.workflow_id }} | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
name: coverage-artifact | |
- name: Get PR number | |
id: get-pr | |
run: echo NUM=$(cat pr_num) >> "$GITHUB_OUTPUT" | |
- uses: Nef10/[email protected] | |
with: | |
lcov-file: lcov.info | |
pr-number: ${{ steps.get-pr.outputs.NUM }} |