Configure Dependabot auto-merge for patch and minor updates using GitHub Actions

domain: docs.github.com/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Create a `.github/dependabot.yml` file to enable Dependabot version updates for your package ecosystems (e.g., npm, pip, docker) with a weekly or daily schedule
  2. Add a GitHub Actions workflow that triggers on `pull_request` events from the `dependabot[bot]` actor; use the `gh` CLI or GitHub API to fetch the Dependabot PR metadata including `dependency-type` and `update-type`
  3. Check the update type using the `dependabot/fetch-metadata` action which exposes outputs like `update-type` (version-update:semver-patch, semver-minor, semver-major) and `dependency-type` (direct, indirect)
  4. If the update is patch or minor (and optionally only direct dependencies), approve the PR with `gh pr review --approve` using a token with `pull-requests: write` permission
  5. Enable auto-merge on the PR with `gh pr merge --auto --squash` so it merges automatically once required status checks pass
  6. Leave major version updates for human review by not approving them in the workflow — they will wait in the PR queue

Known gotchas

Related routes

Configure Dependabot to group related dependency updates into a single pull request using groups in dependabot.yml
docs.github.com · 5 steps · unrated
Write a GitHub Actions composite action that runs linting, testing, and SBOM generation as reusable steps and publishes the composite action to a shared internal repository
docs.github.com · 5 steps · unrated
Configure GitHub merge queue for a protected branch
docs.github.com · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans