diff --git a/.anvil.lock b/.anvil.lock index ebc674b..43a3d3e 100644 --- a/.anvil.lock +++ b/.anvil.lock @@ -1,5 +1,5 @@ { - "generated_at": "2023-12-17T19:20:06.005381304Z", + "generated_at": "2023-12-17T19:44:01.70641145Z", "version": "1.2.1", "files": [ { diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index 32cc79d..30ce356 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -1,7 +1,7 @@ --- name: automerge -on: pull_request_target +on: pull_request permissions: contents: write @@ -43,4 +43,20 @@ jobs: env: GH_TOKEN: ${{ secrets.BOT_PAT_TOKEN }} + cbrgm: + runs-on: ubuntu-latest + if: github.actor == 'cbrgm' && contains(github.event.pull_request.labels.*.name, 'auto-merge') + + steps: + - name: Approve request + id: approve + run: gh pr review --approve ${{ github.event.pull_request.html_url }} + env: + GH_TOKEN: ${{ secrets.BOT_PAT_TOKEN }} + + - name: Enable automerge + id: automerge + run: gh pr merge --rebase --auto ${{ github.event.pull_request.html_url }} + env: + GH_TOKEN: ${{ secrets.BOT_PAT_TOKEN }} ...