# ------------------------------------------------------------
# Copyright (c) Microsoft Corporation and Dapr Contributors.
# Licensed under the MIT License.
# ------------------------------------------------------------

name: dapr-automerge

on:
  schedule:
    - cron: '*/10 * * * *'
  workflow_dispatch:
jobs:
  automerge:
    if: github.repository_owner == 'dapr'
    name: Automerge and update PRs.
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repo
        uses: actions/checkout@v2
      - name: Install dependencies
        run: pip install PyGithub
      - name: Automerge and update
        env:
          MAINTAINERS: AaronCrawfis,orizohar,msfussell
          GITHUB_TOKEN: ${{ secrets.DAPR_BOT_TOKEN }}
        run: python ./.github/scripts/automerge.py
