GH-Pages PR Comment #1721
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: GH-Pages PR Comment | |
on: | |
workflow_run: | |
workflows: ["VeeR-EL2 CI"] | |
types: | |
- completed | |
env: | |
WEB_URL: 'https://chipsalliance.github.io/Cores-VeeR-EL2/' | |
jobs: | |
comment: | |
name: PR Comment | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' }} | |
steps: | |
- name: Download artifact | |
id: download-artifact | |
uses: dawidd6/action-download-artifact@v2 | |
with: | |
name: pr_number | |
path: ./ | |
run_id: ${{ github.event.workflow_run.id }} | |
- name: Extract PR number | |
id: PR | |
run: | | |
cat pr_number.txt | tee "$GITHUB_OUTPUT" | |
- uses: actions/github-script@v6 | |
with: | |
script: | | |
github.rest.issues.createComment({ | |
issue_number: ${{ steps.PR.outputs.number }}, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: 'Coverage report for this PR is available at ${{ env.WEB_URL }}/html/dev/${{ steps.PR.outputs.number }}/coverage_dashboard/all, documentation is available at ${{ env.WEB_URL }}/html/dev/${{ steps.PR.outputs.number }}/docs_rendered/html' | |
}) |