Skip to content

Commit

Permalink
chore: Add auto-merge for dependency updates
Browse files Browse the repository at this point in the history
  • Loading branch information
bennycode committed May 10, 2021
1 parent c5fa9dd commit 076a553
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/auto-merge.yml
@@ -0,0 +1,3 @@
- match:
dependency_type: all
update_type: 'semver:major'
4 changes: 3 additions & 1 deletion .github/dependabot.yml
Expand Up @@ -3,7 +3,9 @@ updates:
- package-ecosystem: npm
directory: '/'
schedule:
day: saturday
interval: weekly
time: '02:00'
pull-request-branch-name:
separator: '-'
target-branch: main
Expand All @@ -12,7 +14,7 @@ updates:
include: scope
labels:
- "type: chore \U0001F9F9"
open-pull-requests-limit: 10
open-pull-requests-limit: 99
ignore:
- dependency-name: 'husky'
versions:
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/merge-dependencies.yml
@@ -0,0 +1,21 @@
name: 'Merge Dependencies'

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

jobs:
auto-merge:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node-version: [12.x]
if: github.actor == 'dependabot[bot]'
steps:
- name: 'Automerge dependency updates from Dependabot'
uses: ahmadnassri/action-dependabot-auto-merge@v2.4.0
# Guarantee that commit comes from Dependabot (don't blindly trust external GitHub Actions)
if: github.actor == 'dependabot[bot]'
with:
github-token: ${{ secrets.GH_AUTOMERGE_TOKEN }}

0 comments on commit 076a553

Please sign in to comment.