Skip to content

PR Comment

PR Comment #3

Workflow file for this run

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 }}