Skip to content

mesh-2816: automate dependabot #4

mesh-2816: automate dependabot

mesh-2816: automate dependabot #4

name: Auto-merge Dependabot PRs
on:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
- labeled
jobs:
enable-automerge:
# Only run on Dependabot PRs
if: github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Fetch Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@ffa630c65fa7e0ecfa0625b5ceda64399aea1b36 #v3.0.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Auto-approve Dependabot PR
uses: hmarr/auto-approve-action@8f929096a962e83ccdfa8afcf855f39f12d4dac7 # v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}