Skip to content

Commit a306e7c

Browse files
authored
Merge pull request #100 from ioBroker-Bot/update-from-template-X0000-setupAutomergeDependabot-1768919790
[iobroker-bot] Setup Auto-Merge for Dependabot PRs
2 parents 66f135d + ace990b commit a306e7c

File tree

2 files changed

+72
-0
lines changed

2 files changed

+72
-0
lines changed

.github/auto-merge.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Auto-merge configuration for Dependabot PRs
2+
# This file configures which dependency updates should be merged automatically.
3+
4+
# Configure here which dependency updates should be merged automatically.
5+
# The recommended configuration is the following:
6+
- match:
7+
# Merge patch updates for production dependencies
8+
dependency_type: production
9+
update_type: 'semver:patch'
10+
- match:
11+
# Merge patch and minor updates for development dependencies
12+
dependency_type: development
13+
update_type: 'semver:minor'
14+
15+
# The syntax is based on the legacy dependabot v1 automerged_updates syntax, see:
16+
# https://dependabot.com/docs/config-file/#automerged_updates
17+
18+
# IMPORTANT: Hierarchical matching applies:
19+
# - semver:patch → only patch updates (e.g., 1.0.0 → 1.0.1)
20+
# - semver:minor → patch AND minor updates (e.g., 1.0.0 → 1.0.1 or 1.0.0 → 1.1.0)
21+
# - semver:major → patch, minor, AND major updates (all version changes)
22+
23+
# Additional examples:
24+
25+
# Allow all patch updates only (both production and development):
26+
# - match:
27+
# update_type: 'semver:patch'
28+
29+
# Allow patch and minor updates for development dependencies:
30+
# - match:
31+
# dependency_type: development
32+
# update_type: 'semver:minor'
33+
34+
# Allow all updates (patch, minor, and major) for development dependencies:
35+
# - match:
36+
# dependency_type: development
37+
# update_type: 'semver:major'
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Workflow for auto-merging Dependabot PRs
2+
# This workflow uses the action-automerge-dependabot action to automatically merge
3+
# Dependabot PRs based on the rules defined in .github/auto-merge.yml
4+
5+
name: Auto-Merge Dependabot PRs
6+
7+
on:
8+
# Trigger when a PR is opened or updated
9+
# WARNING: This needs to be run in the PR base, DO NOT build untrusted code in this action
10+
pull_request_target:
11+
types: [opened, synchronize, reopened]
12+
13+
jobs:
14+
auto-merge:
15+
runs-on: ubuntu-latest
16+
# Only run if actor is dependabot
17+
if: github.actor == 'dependabot[bot]'
18+
19+
permissions:
20+
contents: write
21+
pull-requests: write
22+
23+
steps:
24+
- name: Auto-merge Dependabot PRs
25+
uses: iobroker-bot-orga/action-automerge-dependabot@v1
26+
with:
27+
github-token: ${{ secrets.GITHUB_TOKEN }}
28+
# Optional: Path to your auto-merge configuration file
29+
# config-file-path: '.github/auto-merge.yml'
30+
# Optional: Merge method (merge, squash, or rebase)
31+
# merge-method: 'squash'
32+
# Optional: Wait for other checks to complete
33+
# wait-for-checks: 'true'
34+
# Optional: Maximum time to wait for checks in seconds (default: 3600)
35+
# max-wait-time: '3600'

0 commit comments

Comments
 (0)