next.js/.github/workflows/pr_ci_comment.yml
pr_ci_comment.yml36 lines935 B
name: PR CI Comment

on:
  workflow_run:
    workflows: ['build-and-test', 'Generate Stats']
    types: [completed]

permissions:
  actions: read
  contents: read
  pull-requests: write

jobs:
  comment:
    name: Comment on PR
    if: ${{ github.event.workflow_run.event == 'pull_request' && github.repository == 'vercel/next.js' }}
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          persist-credentials: false

      - name: Download PR metadata
        continue-on-error: true
        uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
        with:
          name: pr-ci-metadata
          path: pr-ci-metadata
          run-id: ${{ github.event.workflow_run.id }}
          github-token: ${{ secrets.GITHUB_TOKEN }}

      - name: Comment on PR
        run: node scripts/pr-ci-comment.mjs
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Quest for Codev2.0.0
/
SIGN IN