From 2d33b0419634cb397e6325dc8d4402a9203484cf Mon Sep 17 00:00:00 2001 From: Yuwei Ba Date: Wed, 20 Sep 2023 03:50:08 +1000 Subject: [PATCH] Create dependabot.yaml Signed-off-by: Yuwei Ba --- .github/workflows/dependabot.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/dependabot.yaml diff --git a/.github/workflows/dependabot.yaml b/.github/workflows/dependabot.yaml new file mode 100644 index 000000000..7a22a0a04 --- /dev/null +++ b/.github/workflows/dependabot.yaml @@ -0,0 +1,21 @@ +name: Dependabot auto-approve +on: pull_request + +permissions: + pull-requests: write + +jobs: + dependabot: + runs-on: ubuntu-latest + if: ${{ github.actor == 'dependabot[bot]' }} + steps: + - name: Dependabot metadata + id: metadata + uses: dependabot/fetch-metadata@v1 + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" + - name: Approve a PR + run: gh pr review --approve "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}