From 333a9d48eaf1d52be0a137c21a079f4ecca9ea6e Mon Sep 17 00:00:00 2001 From: Ayman Bagabas Date: Thu, 19 Dec 2024 09:12:12 +0300 Subject: [PATCH] feat(ci): auto-merge dependabot PRs --- .github/workflows/test.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6c7a8c7..0839c96 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,3 +26,22 @@ jobs: - name: Build run: npm run build + + dependabot: + needs: [run-action] + runs-on: ubuntu-latest + permissions: + pull-requests: write + contents: write + if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'}} + steps: + - id: metadata + uses: dependabot/fetch-metadata@v2 + with: + github-token: '${{ secrets.GITHUB_TOKEN }}' + - run: | + gh pr review --approve "$PR_URL" + gh pr merge --squash --auto "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}