Skip to content

Commit 5b76a76

Browse files
authored
Merge pull request #3918 from arash77/replace-daneden/enable-automerge-action-with-github-cli
Refactor auto-merge bot workflow to use GitHub CLI for automerging PRs
2 parents 0eddb93 + 9916fad commit 5b76a76

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/auto-merge-bot.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@ on:
77
jobs:
88
automerge:
99
runs-on: ubuntu-latest
10+
if: github.event.pull_request.user.login == 'dockerhub-toolshed'
1011
steps:
1112
- uses: actions/create-github-app-token@v3
1213
id: app-token
1314
with:
1415
app-id: 3114451
1516
private-key: ${{ secrets.APP_PRIVATE_KEY }}
1617

17-
- uses: daneden/enable-automerge-action@v1
18-
with:
19-
github-token: ${{ steps.app-token.outputs.token }}
20-
allowed-author: "dockerhub-toolshed"
18+
- name: Enable Pull Request Automerge
19+
run: gh pr merge --merge --auto "${{ github.event.pull_request.number }}"
20+
env:
21+
GH_TOKEN: ${{ steps.app-token.outputs.token }}

0 commit comments

Comments
 (0)