From 0e02a9d54bc20e98161e7f66754a1702c48b8962 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 21 Oct 2024 20:06:58 -0700 Subject: [PATCH] chore: Configure Renovate (#179) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Yash Singh --- .github/dependabot.yml | 13 ----- .github/workflows/dependabot-merge.yml | 74 -------------------------- renovate.json | 4 ++ 3 files changed, 4 insertions(+), 87 deletions(-) delete mode 100644 .github/dependabot.yml delete mode 100644 .github/workflows/dependabot-merge.yml create mode 100644 renovate.json diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index c1888b7..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,13 +0,0 @@ -version: 2 -updates: - - package-ecosystem: npm - directory: '/' - schedule: - interval: daily - time: '13:00' - open-pull-requests-limit: 10 - - - package-ecosystem: 'github-actions' - directory: '/' - schedule: - interval: 'daily' diff --git a/.github/workflows/dependabot-merge.yml b/.github/workflows/dependabot-merge.yml deleted file mode 100644 index 0c4d368..0000000 --- a/.github/workflows/dependabot-merge.yml +++ /dev/null @@ -1,74 +0,0 @@ -name: Dependabot auto-approve/merge -on: - pull_request: - types: [opened, reopened, synchronize, labeled] - -permissions: - pull-requests: write - contents: write - -jobs: - dependabot: - runs-on: ubuntu-latest - if: ${{ contains(github.event.pull_request.labels.*.name, 'github_actions') && github.actor == 'dependabot[bot]' }} - steps: - - name: Wait for build to succeed - uses: fountainhead/action-wait-for-check@v1.2.0 - id: wait-for-build3 - with: - token: ${{ secrets.GITHUB_TOKEN }} - checkName: Lint code - ref: ${{ github.event.pull_request.head.sha || github.sha }} - - - name: Wait for build to succeed - uses: fountainhead/action-wait-for-check@v1.2.0 - id: wait-for-build4 - with: - token: ${{ secrets.GITHUB_TOKEN }} - checkName: Run tests (18.x) - ref: ${{ github.event.pull_request.head.sha || github.sha }} - - - name: Wait for build to succeed - uses: fountainhead/action-wait-for-check@v1.2.0 - id: wait-for-build5 - with: - token: ${{ secrets.GITHUB_TOKEN }} - checkName: Run tests (19.x) - ref: ${{ github.event.pull_request.head.sha || github.sha }} - - - name: Wait for build to succeed - uses: fountainhead/action-wait-for-check@v1.2.0 - id: wait-for-build6 - with: - token: ${{ secrets.GITHUB_TOKEN }} - checkName: Run tests (20.x) - ref: ${{ github.event.pull_request.head.sha || github.sha }} - - - name: Wait for build to succeed - uses: fountainhead/action-wait-for-check@v1.2.0 - id: wait-for-build7 - with: - token: ${{ secrets.GITHUB_TOKEN }} - checkName: Run tests (21.x) - ref: ${{ github.event.pull_request.head.sha || github.sha }} - - - name: Dependabot metadata - if: steps.wait-for-build.outputs.conclusion == 'success' && steps.wait-for-build2.outputs.conclusion == 'success' && steps.wait-for-build3.outputs.conclusion == 'success' && steps.wait-for-build4.outputs.conclusion == 'success' && steps.wait-for-build5.outputs.conclusion == 'success' && steps.wait-for-build6.outputs.conclusion == 'success' && steps.wait-for-build7.outputs.conclusion == 'success' - id: metadata - uses: dependabot/fetch-metadata@v2.2.0 - with: - github-token: '${{ secrets.GITHUB_TOKEN }}' - - - name: Approve a PR - if: steps.wait-for-build.outputs.conclusion == 'success' && steps.wait-for-build2.outputs.conclusion == 'success' && steps.wait-for-build3.outputs.conclusion == 'success' && steps.wait-for-build4.outputs.conclusion == 'success' && steps.wait-for-build5.outputs.conclusion == 'success' && steps.wait-for-build6.outputs.conclusion == 'success' && steps.wait-for-build7.outputs.conclusion == 'success' && steps.metadata.outputs.update-type != 'version-update:semver-major' - run: gh pr review --approve "$PR_URL" - env: - PR_URL: ${{github.event.pull_request.html_url}} - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - - - name: Auto-merge Dependabot PRs - if: steps.wait-for-build.outputs.conclusion == 'success' && steps.wait-for-build2.outputs.conclusion == 'success' && steps.wait-for-build3.outputs.conclusion == 'success' && steps.wait-for-build4.outputs.conclusion == 'success' && steps.wait-for-build5.outputs.conclusion == 'success' && steps.wait-for-build6.outputs.conclusion == 'success' && steps.wait-for-build7.outputs.conclusion == 'success' && steps.metadata.outputs.update-type != 'version-update:semver-major' - run: gh pr merge --auto --merge "$PR_URL" - env: - PR_URL: ${{github.event.pull_request.html_url}} - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..22a9943 --- /dev/null +++ b/renovate.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": ["config:recommended"] +}