Skip to content

Auto-Approve Safe PRs (workflow-run) #2283

Auto-Approve Safe PRs (workflow-run)

Auto-Approve Safe PRs (workflow-run) #2283

name: Auto-Approve Safe PRs (workflow-run)
on:
workflow_run:
workflows: [Auto-Approve Safe PRs]
types:
- completed
permissions: {}
jobs:
auto-approve-run:
runs-on: ubuntu-latest
environment: themoeway-bot
permissions:
pull-requests: write
if: github.actor == 'djahandarie'
steps:
- name: Download workflow artifact
uses: dawidd6/action-download-artifact@bf251b5aa9c2f7eeb574a96ee720e24f801b7c11 # v6
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
workflow: auto-approve.yml
run_id: ${{ github.event.workflow_run.id }}
- name: Read the pr_num file
id: pr_num_reader
uses: juliangruber/read-file-action@b549046febe0fe86f8cb4f93c24e284433f9ab58 # v1.1.7
with:
path: ./pr_num/pr_num.txt
- uses: hmarr/auto-approve-action@f0939ea97e9205ef24d872e76833fa908a770363 # v4.0.0
with:
pull-request-number: ${{ steps.pr_num_reader.outputs.content }}
github-token: ${{ secrets.THEMOEWAY_BOT_PAT }}