Skip to content

Commit

Permalink
added automerge.yml workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jens-maus committed Nov 22, 2023
1 parent b7d9eac commit 460f4cc
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 6 deletions.
17 changes: 17 additions & 0 deletions .github/auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Configure here which dependency updates should be merged automatically.
# The recommended configuration is the following:
- match:
# Only merge patches for production dependencies
dependency_type: production
update_type: "semver:patch"
- match:
# Except for security fixes, here we allow minor patches
dependency_type: production
update_type: "security:minor"
- match:
# and development dependencies can have a minor update, too
dependency_type: development
update_type: "semver:minor"

# The syntax is based on the legacy dependabot v1 automerged_updates syntax, see:
# https://dependabot.com/docs/config-file/#automerged_updates
22 changes: 16 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 10
versioning-strategy: increase
# Maintain dependencies for GitHub Actions
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: monthly
time: "04:00"
timezone: Europe/Berlin

- package-ecosystem: npm
directory: "/"
schedule:
interval: monthly
time: "04:00"
timezone: Europe/Berlin
open-pull-requests-limit: 20
versioning-strategy: increase
22 changes: 22 additions & 0 deletions .github/workflows/dependabot-automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Automatically merge Dependabot PRs when version comparison is within the range
# that is configured in .github/auto-merge.yml

name: Auto-Merge Dependabot PRs

on:
pull_request_target:

jobs:
auto-merge:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Check if PR should be auto-merged
uses: ahmadnassri/action-dependabot-auto-merge@v2
with:
# This must be a personal access token with push access
github-token: ${{ secrets.AUTO_MERGE_TOKEN }}
# By default, squash and merge, so Github chooses nice commit messages
command: squash and merge

0 comments on commit 460f4cc

Please sign in to comment.