Skip to content

Instantly share code, notes, and snippets.

@prophile
Created April 21, 2026 10:35
Show Gist options
  • Select an option

  • Save prophile/b33948f638a999fa1481f26df6bc564d to your computer and use it in GitHub Desktop.

Select an option

Save prophile/b33948f638a999fa1481f26df6bc564d to your computer and use it in GitHub Desktop.
GitHub Actions workflow which automatically merges dependabot PRs
name: Dependabot auto-merge
on: pull_request
permissions:
contents: write
pull-requests: write
jobs:
dependabot:
name: Auto-merge Dependabot PRs
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment