Skip to content

PR Review

PR Review #3

Workflow file for this run

name: PR Review
on:
workflow_run:
workflows: [Test]
types: [completed]
permissions:
pull-requests: write
actions: read
contents: read
jobs:
review:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.event == 'pull_request' }}
steps:
- name: Download PR number
uses: actions/download-artifact@v4
with:
name: pr-number
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ github.token }}
- name: Read PR number
id: pr
run: echo "number=$(cat pr-number.txt)" >> "$GITHUB_OUTPUT"
- uses: mate-academy/auto-approve-action@v2
if: ${{ github.event.workflow_run.conclusion == 'success' }}
with:
github-token: ${{ github.token }}
pull-request-number: ${{ steps.pr.outputs.number }}
- uses: mate-academy/auto-reject-action@v2
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
with:
github-token: ${{ github.token }}
pull-request-number: ${{ steps.pr.outputs.number }}