aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/auto-approve-run.yml
diff options
context:
space:
mode:
authorDarius Jahandarie <djahandarie@gmail.com>2023-10-01 12:43:45 +0900
committerGitHub <noreply@github.com>2023-10-01 12:43:45 +0900
commit0fbfeb883eb4ca03b9a802757138fef9a6835cdc (patch)
treed752d7594d8302f149eb6aa30485a324ab7aa883 /.github/workflows/auto-approve-run.yml
parentea1c147730bef183855f5dc079c9a2d19e1c623e (diff)
parent0fa8d441a269b13474e6ad4108f49497d4d3abfd (diff)
Merge branch 'master' into dependabot/github_actions/cardinalby/schema-validator-action-3.0.0
Diffstat (limited to '.github/workflows/auto-approve-run.yml')
-rw-r--r--.github/workflows/auto-approve-run.yml30
1 files changed, 30 insertions, 0 deletions
diff --git a/.github/workflows/auto-approve-run.yml b/.github/workflows/auto-approve-run.yml
new file mode 100644
index 00000000..7ea82489
--- /dev/null
+++ b/.github/workflows/auto-approve-run.yml
@@ -0,0 +1,30 @@
+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@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e # v2.28.0
+ 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@02bbba9876a8f870efd4ad64e3b9088d3fb94d4b # v1.1.6
+ with:
+ path: ./pr_num/pr_num.txt
+ - uses: hmarr/auto-approve-action@44888193675f29a83e04faf4002fa8c0b537b1e4 # v3.2.1
+ with:
+ pull-request-number: ${{ steps.pr_num_reader.outputs.content }}
+ github-token: ${{ secrets.THEMOEWAY_BOT_PAT }}