Skip to content

Commit efa5c0c

Browse files
committed
Automatically merge dependabot/auto-upgrade PRs.
1 parent c6cfe5d commit efa5c0c

File tree

1 file changed

+11
-23
lines changed

1 file changed

+11
-23
lines changed

.github/workflows/auto-merge.yml

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,17 @@
1-
name: Node.js CI
1+
name: Auto-merge
2+
on: pull_request
23

3-
on:
4-
push:
5-
branches: [master]
6-
pull_request:
7-
branches: [master]
4+
permissions:
5+
contents: write
6+
pull-requests: write
87

98
jobs:
10-
test:
9+
auto-merge:
1110
runs-on: ubuntu-latest
12-
13-
strategy:
14-
matrix:
15-
node-version: [14.x, 16.x, 18.x]
16-
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
17-
11+
if: ${{ github.actor == 'dependabot[bot]' || github.actor == 'auto-npm-upgrade[bot]' }}
1812
steps:
19-
- uses: actions/checkout@v3
20-
- name: Use Node.js ${{ matrix.node-version }}
21-
uses: actions/setup-node@v3
22-
with:
23-
node-version: ${{ matrix.node-version }}
24-
cache: "npm"
25-
- run: npm ci
26-
- run: npm run build
27-
- run: npm run test
13+
- name: Enable auto-merge for Dependabot PRs
14+
run: gh pr merge --auto --merge "$PR_URL"
2815
env:
29-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16+
PR_URL: ${{github.event.pull_request.html_url}}
17+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)