Skip to content

Commit 8704b92

Browse files
maint: Add Dependabot automerge action (#61)
Co-authored-by: pyansys-ci-bot <[email protected]>
1 parent 3f284e5 commit 8704b92

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

.github/workflows/cicd.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,3 +197,24 @@ jobs:
197197
bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
198198
bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }}
199199

200+
automerge-prs:
201+
name: Automerge PRs (dependabot and pre-commit.ci only)
202+
runs-on: ubuntu-latest
203+
needs: [build-library]
204+
if: github.event_name == 'pull_request'
205+
permissions:
206+
contents: write
207+
pull-requests: write
208+
steps:
209+
- name: Automerge PRs
210+
uses: ansys/actions/hk-automerge-prs@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
211+
with:
212+
approver: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
213+
approver-token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
214+
215+
- name: If pre-commit PR, add assignee
216+
if: startsWith(github.head_ref, 'pre-commit-ci-update-config')
217+
run: gh pr edit --add-assignee pyansys-ci-bot "$PR_URL"
218+
env:
219+
PR_URL: ${{github.event.pull_request.html_url}}
220+
GH_TOKEN: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Maint: Add Dependabot automerge action

0 commit comments

Comments
 (0)