From c4395e47c134cafc4620528e28da721c5afd9d35 Mon Sep 17 00:00:00 2001 From: Palash Mondal Date: Thu, 18 Apr 2024 09:47:08 +0530 Subject: [PATCH] feat: update renovate config --- .github/dependabot.yml | 18 ------------------ renovate.json => .github/renovate.json | 4 +--- .github/workflows/auto-approve.yml | 20 ++++++++++++++++++++ .github/workflows/main.yml | 15 ++++++--------- 4 files changed, 27 insertions(+), 30 deletions(-) delete mode 100644 .github/dependabot.yml rename renovate.json => .github/renovate.json (55%) create mode 100644 .github/workflows/auto-approve.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index fe3a155..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,18 +0,0 @@ -version: 2 -updates: - - package-ecosystem: "npm" - directory: "/" - schedule: - interval: "daily" - open-pull-requests-limit: 10 - ignore: - - dependency-name: "*" - update-types: ["version-update:semver-major"] - commit-message: - prefix: "chore" - - package-ecosystem: "github-actions" - directory: "/" - commit-message: - prefix: "chore" - schedule: - interval: "monthly" diff --git a/renovate.json b/.github/renovate.json similarity index 55% rename from renovate.json rename to .github/renovate.json index 5a5e23d..b5bdf51 100644 --- a/renovate.json +++ b/.github/renovate.json @@ -1,6 +1,4 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": [ - "local>palashmon/renovate-config" - ] + "extends": ["github>palashmon/renovate-config"] } diff --git a/.github/workflows/auto-approve.yml b/.github/workflows/auto-approve.yml new file mode 100644 index 0000000..c501b63 --- /dev/null +++ b/.github/workflows/auto-approve.yml @@ -0,0 +1,20 @@ +name: Auto-approve PR +on: pull_request_target +permissions: + contents: write + pull-requests: write +jobs: + auto-approve-renovate-prs: + runs-on: ubuntu-latest + steps: + - name: Git Checkout + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + fetch-depth: '0' + - name: Approve PR + if: github.actor == 'renovate[bot]' + run: | + gh pr review --approve ${{ github.event.number }} -b "I'm **approving** \ + this pull request because it includes a patch or minor update." + env: + GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}" \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a768beb..a5e1051 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,7 +1,5 @@ name: CI -on: - - push - - pull_request +on: [push, pull_request] jobs: test: name: Node.js ${{ matrix.node-version }} @@ -9,13 +7,12 @@ jobs: strategy: fail-fast: false matrix: - node-version: - - 21 - - 20 - - 18 + node-version: ['lts/*', 'current'] steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 + - name: Checkout Repo + uses: actions/checkout@v4 + - name: Setup Node.js (${{ matrix.node-version }}) + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - run: npm install