From e80a71065db3935375ec8f9eb74a62edd00b3aaf Mon Sep 17 00:00:00 2001 From: BG Date: Fri, 11 Oct 2024 14:36:44 +0200 Subject: [PATCH] [workflow] Add auto-approver workflow for dependabot --- .github/workflows/auto-approver.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/auto-approver.yml diff --git a/.github/workflows/auto-approver.yml b/.github/workflows/auto-approver.yml new file mode 100644 index 00000000..eb4c2a05 --- /dev/null +++ b/.github/workflows/auto-approver.yml @@ -0,0 +1,21 @@ +name: Auto Approve + +on: + pull_request_target: + +permissions: + pull-requests: write + contents: write + +jobs: + dependabot-pr: + name: Dependabot PR + runs-on: ubuntu-latest + if: github.actor == 'dependabot[bot]' + env: + GH_TOKEN: ${{ secrets.CF_PROM_CI_BOT_TOKEN }} + steps: + - name: Approve PRs from Dependabot + run: gh pr review "${{ github.event.pull_request.html_url }}" --approve + - name: Enable Auto-Merge for Dependabot PRs + run: gh pr merge "${{ github.event.pull_request.html_url }}" --auto --rebase