From fc03c613c3a30e75b0eb743386908c61e2adb50f Mon Sep 17 00:00:00 2001 From: m1m1sha <18262227804@163.com> Date: Fri, 12 Jul 2024 10:12:52 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=B3=20chore:=20dependabot?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/dependabot.yml | 9 ++++++++ .github/workflows/dependabot-auto-approve.yml | 21 +++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/dependabot-auto-approve.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..e03c9d3 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,9 @@ +version: 2 +updates: + # Enable version updates for npm + - package-ecosystem: npm + # Look for `package.json` and `lock` files in the `root` directory + directory: / + # Check the npm registry for updates every day (weekdays) + schedule: + interval: daily diff --git a/.github/workflows/dependabot-auto-approve.yml b/.github/workflows/dependabot-auto-approve.yml new file mode 100644 index 0000000..00d9d5a --- /dev/null +++ b/.github/workflows/dependabot-auto-approve.yml @@ -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@v2 + 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}} + GH_TOKEN: ${{secrets.GITHUB_TOKEN}} \ No newline at end of file