From 05d1fcec98297d4e47e3bcf5c254a8ed85d61d84 Mon Sep 17 00:00:00 2001 From: Sanjay Chacku Purakal <48321566+twoneis@users.noreply.github.com> Date: Sat, 27 Apr 2024 14:10:44 +0200 Subject: [PATCH] Create merge.yml --- .github/workflows/merge.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/merge.yml diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml new file mode 100644 index 0000000..cd0970f --- /dev/null +++ b/.github/workflows/merge.yml @@ -0,0 +1,22 @@ +name: auto-merge + +on: + pull_request: + branches: [ "main" ] + +jobs: + merge: + runs-on: ubuntu-latest + if: ${{ github.actor == 'twoneis' }} && ${{ github.event.pull_request.title == 'flake.lock: Update' }} + + steps: + - name: Approve PR + run: gh pr review --approve "$PR_URL" + env: + PR_URL: ${{ github.event.pull_request.html_url }} + GITHUB_TOKEN: ${{ secrets.GH_TOKEN_FOR_UPDATES }} + - name: Enable auto-merge for PR + run: gh pr merge --auto --rebase "$PR_URL" + env: + PR_URL: ${{ github.event.pull_request.html_url }} + GITHUB_TOKEN: ${{ secrets.GH_TOKEN_FOR_UPDATES }}