diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml new file mode 100644 index 000000000..c6bafe704 --- /dev/null +++ b/.github/workflows/automerge.yml @@ -0,0 +1,18 @@ +name: automerge +on: + pull_request: + types: [opened, reopened, synchronize, ready_for_review] +permissions: + contents: write + pull-requests: write +jobs: + automerge: + runs-on: ubuntu-latest + if: >- + github.event.pull_request.draft == false && + github.event.pull_request.head.repo.full_name == github.repository + steps: + - run: gh pr merge --squash --auto "$PR_URL" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR_URL: ${{ github.event.pull_request.html_url }}