Skip to content

Commit 86d5696

Browse files
committed
refactor: Replace action-dependabot-auto-merge
1 parent b7c8368 commit 86d5696

File tree

2 files changed

+15
-17
lines changed

2 files changed

+15
-17
lines changed

.github/auto-merge.yml

-3
This file was deleted.
+15-14
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
name: 'Merge Dependencies'
22

33
# https://github.blog/changelog/2021-02-19-github-actions-workflows-triggered-by-dependabot-prs-will-run-with-read-only-permissions/
4-
# https://github.com/ahmadnassri/action-dependabot-auto-merge/issues/60#issuecomment-806027389
54
on: [pull_request_target]
65

6+
permissions:
7+
pull-requests: write
8+
contents: write
9+
710
jobs:
811
auto-merge:
9-
runs-on: ${{ matrix.os }}
10-
strategy:
11-
matrix:
12-
os: [ubuntu-latest]
13-
node-version: [16.x]
14-
if: github.actor == 'dependabot[bot]'
12+
runs-on: ubuntu-latest
13+
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }}
1514
steps:
16-
- name: 'Checkout repository'
17-
uses: actions/[email protected]
18-
19-
- name: 'Automerge dependency updates from Dependabot'
20-
uses: ahmadnassri/[email protected]
21-
# Guarantee that commit comes from Dependabot (don't blindly trust external GitHub Actions)
22-
if: github.actor == 'dependabot[bot]'
15+
- name: Extract information about the dependency
16+
id: metadata
17+
uses: dependabot/[email protected]
2318
with:
2419
github-token: ${{ secrets.GH_AUTOMERGE_TOKEN }}
20+
21+
- name: Automatically merge the dependency
22+
run: gh pr merge --auto --squash "$PR_URL"
23+
env:
24+
PR_URL: ${{ github.event.pull_request.html_url }}
25+
GITHUB_TOKEN: ${{ secrets.GH_AUTOMERGE_TOKEN }}

0 commit comments

Comments
 (0)