Comment on the pull request #25
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 | |
# read-write repo token | |
# access to secrets | |
on: | |
workflow_run: | |
workflows: [".NET Core"] | |
types: | |
- completed | |
permissions: | |
pull-requests: write | |
actions: write | |
issues: write | |
contents: write | |
env: | |
GITHUB_TOKEN: ${{ secrets.PR_KEY }} | |
jobs: | |
build: | |
name: Comment on PR | |
runs-on: ubuntu-latest | |
if: > | |
github.event.workflow_run.event == 'pull_request' && | |
github.event.workflow_run.conclusion == 'success' | |
permissions: write-all | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: my-artifact | |
- name: Add Coverage PR Comment | |
uses: marocchino/sticky-pull-request-comment@v2 | |
with: | |
recreate: true | |
path: code-coverage-results.md | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |