Skip to content

Dependabot Automerge #528

Dependabot Automerge

Dependabot Automerge #528

### .github/workflows/dependabot_automerge.yml
### This workflow has access to secrets and a read-write token
name: Dependabot Automerge
on:
workflow_run:
workflows: ["trailscraper standard checks pipeline"]
types:
- completed
jobs:
auto-merge-dependabot-pr:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' && github.actor == 'dependabot[bot]' }}
steps:
- name: auto-merge dependabot pull request
run: gh pr merge --repo ${GITHUB_REPOSITORY} --auto --rebase "${PR_BRANCH}"
env:
PR_BRANCH: ${{ github.event.workflow_run.head_branch }}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}