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}}