Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
git-merge

GitHub Action

Dependabot Auto Merge

v1.2.2

Dependabot Auto Merge

git-merge

Dependabot Auto Merge

Automatically merge Dependabot PRs when version comparison is within range

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Dependabot Auto Merge

uses: ahmadnassri/[email protected]

Learn more about this action in ahmadnassri/action-dependabot-auto-merge

Choose a version

GitHub Action: Dependabot Auto Merge

license version super linter test release

Automatically merge Dependabot PRs when version comparison is within range

Usage

name: auto-merge

on:
  pull_request:

jobs:
  auto-merge:
    runs-on: ubuntu-latest
    steps:
      - uses: ahmadnassri/action-dependabot-auto-merge@v1

Examples

Use a specific user's Personal Access Token:

steps:
  - uses: ahmadnassri/action-dependabot-auto-merge@v1
    with:
      target: patch
      github-token: ${{ secrets.mytoken }}

Only merge if the changed dependency version is a patch (default behavior):

steps:
  - uses: ahmadnassri/action-dependabot-auto-merge@v1
    with:
      target: patch

Only merge if the changed dependency version is a minor:

steps:
  - uses: ahmadnassri/action-dependabot-auto-merge@v1
    with:
      target: minor

Only merge if the changed dependency version is a major:

steps:
  - uses: ahmadnassri/action-dependabot-auto-merge@v1
    with:
      target: major

Inputs

input required default description
target patch The version comparison target (major, minor, patch)
github-token github.token The GitHub token used to merge the pull-request
command merge The command to pass to Dependabot
approve true Auto-approve pull-requests