-
Notifications
You must be signed in to change notification settings - Fork 75
42 lines (36 loc) · 1.15 KB
/
gh-pages-pr-comment.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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 }}'
})