name: 🤖 dep auto merge

on:
  pull_request:
    branches:
      - dev
  workflow_dispatch:

permissions:
  pull-requests: write
  issues: write
  repository-projects: write

jobs:
  automerge:
    runs-on: ubuntu-latest
    if: github.actor == 'dependabot[bot]'
    steps:
      - uses: actions/checkout@v4
        with:
          token: ${{ secrets.DEPENDABOT_PAT }}

      - uses: ahmadnassri/action-dependabot-auto-merge@v2
        with:
          github-token: ${{ secrets.DEPENDABOT_PAT }}
          target: all