-
-
Notifications
You must be signed in to change notification settings - Fork 164
50 lines (41 loc) · 1.21 KB
/
pr-comment.yml
File metadata and controls
50 lines (41 loc) · 1.21 KB
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
43
44
45
46
47
48
49
50
name: PR Comment
on:
workflow_run:
workflows: ["PR Build"]
types:
- completed
jobs:
comment-pr:
name: Comment PR
runs-on: ubuntu-latest
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'
permissions:
contents: read
actions: read
issues: write
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: pr-build
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: Install script dependencies
run: pnpm install --ignore-scripts
- name: Add or update PR comment
run: node .github/scripts/pr-updated.mjs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.workflow_run.pull_requests[0].number }}