Skip to content

PR (Actions)

PR (Actions) #184

Workflow file for this run

name: PR (Actions)
# Triggered when "PR (Check)" completes. Downloads the artifact produced by
# the upstream workflow and applies the recorded actions (sticky comments,
# label changes, close, etc.) with write permissions. Never executes PR
# source code — only reads the JSON artifact.
on:
workflow_run:
workflows: ["PR (Check)"]
types: [completed]
jobs:
actions:
name: PR (Actions)
if: >
github.event.workflow_run.conclusion == 'success' &&
github.repository == 'remix-run/react-router'
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
actions: read
steps:
# Check's out the base (main) branch - not the PR branch
- name: ⬇️ Checkout repo
uses: actions/checkout@v6
- name: 📦 Setup pnpm
uses: pnpm/action-setup@v6
- name: ⎔ Setup node
uses: actions/setup-node@v6
with:
node-version-file: ".nvmrc"
cache: pnpm
- name: 📥 Install deps
run: pnpm install --frozen-lockfile
- name: 📥 Download result from upstream workflow
uses: actions/download-artifact@v8
with:
name: pr-checks-result
github-token: ${{ github.token }}
run-id: ${{ github.event.workflow_run.id }}
- name: 💬 Apply actions
env:
GITHUB_TOKEN: ${{ github.token }}
run: node scripts/pr.ts actions pr-checks-result.json