Skip to content

Commit 54a53a3

Browse files
authored
Merge pull request #296 from keymanapp/maint/601-add-auto-approve-action
maint: add auto approve action
2 parents f0e4710 + 73504e7 commit 54a53a3

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#
2+
# Automatically approves and queues for merge any pull requests with a branch
3+
# name starting with auto/, that are opened by keyman-server.
4+
#
5+
name: Auto Approve and Merge PRs from keyman-server
6+
7+
on: pull_request_target
8+
9+
jobs:
10+
auto-approve:
11+
if: github.actor == 'keyman-server' && startsWith(github.head_ref, 'auto/')
12+
runs-on: ubuntu-latest
13+
env:
14+
GH_TOKEN: ${{ secrets.AUTO_PR_APPROVAL_BY_KEYMAN_STATUS }}
15+
permissions: write-all
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4.1.5
19+
with:
20+
sparse-checkout: |
21+
README.md
22+
sparse-checkout-cone-mode: false
23+
- name: Approve pull request
24+
run: |
25+
gh pr review --approve ${{github.head_ref}}
26+
- name: Enable auto-merge
27+
run: |
28+
gh pr merge --merge --auto ${{github.head_ref}}

0 commit comments

Comments
 (0)