Skip to content

Commit 877a055

Browse files
authored
Merge pull request #64 from canonical/IAM-1021
Add auto approver workflow
2 parents 9c228a3 + ce52007 commit 877a055

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/auto-approver.yaml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: auto-approver
2+
run-name: CI for approving PRs
3+
4+
on:
5+
push:
6+
branches:
7+
- "renovate/**"
8+
- "automated-update-charm-libs"
9+
10+
jobs:
11+
autoapprove:
12+
runs-on: ubuntu-22.04
13+
steps:
14+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
15+
- name: Approve PR
16+
run: |
17+
gh pr review --approve || true
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
20+
- name: Enable automerge if required
21+
if: startsWith(github.ref_name, 'renovate/auto-')
22+
run: |
23+
gh pr merge --auto --merge || true
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}

0 commit comments

Comments
 (0)