Skip to content
This repository was archived by the owner on Feb 11, 2025. It is now read-only.

Commit 050ad87

Browse files
committed
ci: enhance gh workflow to automerge dependency PRs
1 parent 540b3f6 commit 050ad87

File tree

2 files changed

+22
-21
lines changed

2 files changed

+22
-21
lines changed

.github/workflows/autoapprove.yml

-21
This file was deleted.

.github/workflows/automerge.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Auto-merge dependency PRs
2+
on: pull_request
3+
4+
permissions:
5+
pull-requests: write
6+
contents: write
7+
8+
jobs:
9+
dependabot:
10+
runs-on: ubuntu-latest
11+
if: github.actor == 'dependabot[bot]' || github.actor == 'CFN-CI'
12+
steps:
13+
- name: Approve a PR
14+
run: gh pr review --approve "$PR_URL"
15+
env:
16+
PR_URL: ${{github.event.pull_request.html_url}}
17+
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
18+
- name: Enable auto-merge for Dependabot PRs
19+
run: gh pr merge --auto --merge "$PR_URL"
20+
env:
21+
PR_URL: ${{github.event.pull_request.html_url}}
22+
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)