From ce52007a86f6d3130dbfd72bf40253571bbbb1e7 Mon Sep 17 00:00:00 2001 From: Nikos Date: Thu, 5 Sep 2024 13:06:59 +0300 Subject: [PATCH] ci: add auto approver workflow --- .github/workflows/auto-approver.yaml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/auto-approver.yaml diff --git a/.github/workflows/auto-approver.yaml b/.github/workflows/auto-approver.yaml new file mode 100644 index 00000000..a326e460 --- /dev/null +++ b/.github/workflows/auto-approver.yaml @@ -0,0 +1,25 @@ +name: auto-approver +run-name: CI for approving PRs + +on: + push: + branches: + - "renovate/**" + - "automated-update-charm-libs" + +jobs: + autoapprove: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 + - name: Approve PR + run: | + gh pr review --approve || true + env: + GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} + - name: Enable automerge if required + if: startsWith(github.ref_name, 'renovate/auto-') + run: | + gh pr merge --auto --merge || true + env: + GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}