Skip to content

GH-Pages PR Comment #45

GH-Pages PR Comment

GH-Pages PR Comment #45

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: 'Links to coverage and verification reports for this PR (#${{ steps.PR.outputs.number }}) are available at ${{ env.WEB_URL }}'
})