Skip to content

Dependabot

Dependabot #50

Workflow file for this run

name: Dependabot
on:
workflow_run:
workflows: ["CI"]
types:
- completed
jobs:
auto-merge:
runs-on: ubuntu-slim
if: >
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.event == 'pull_request' &&
contains(github.event.workflow_run.actor.login, 'dependabot')
permissions:
contents: write
pull-requests: write
steps:
- name: Auto-merge Dependabot PR
run: |
pr_number=$(gh api repos/${{ github.repository }}/pulls \
--jq '.[] | select(.head.sha == "${{ github.event.workflow_run.head_sha }}") | .number')
if [ -n "$pr_number" ]; then
gh pr merge "$pr_number" --auto --squash --repo ${{ github.repository }}
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}