Skip to content

Commit 5f72fe1

Browse files
committed
updated ci with automerge dependabot green PRs
1 parent 10d2935 commit 5f72fe1

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,19 @@ jobs:
4343
.
4444
!node_modules
4545
retention-days: 1
46-
46+
47+
dependabot:
48+
name: 'Dependabot'
49+
needs: build # After the E2E and build jobs, if one of them fails, it won't merge the PR.
50+
runs-on: ubuntu-latest
51+
if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'}} # Detect that the PR author is dependabot
52+
steps:
53+
- name: Enable auto-merge for Dependabot PRs
54+
run: gh pr merge --auto --merge "$PR_URL" # Use Github CLI to merge automatically the PR
55+
env:
56+
PR_URL: ${{github.event.pull_request.html_url}}
57+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
58+
4759
npm-publish-build:
4860
needs: build
4961
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)