From 9caab2c1f6aa723d3168f2ac988f718400fe4478 Mon Sep 17 00:00:00 2001 From: ccoeurderoy Date: Mon, 13 Mar 2023 10:39:30 +0100 Subject: [PATCH] ci(dependabot): auto-merge PRs for non-major versions --- .github/dependabot.yml | 82 ------------------------- .github/workflows/test-and-publish.yaml | 21 ++++++- 2 files changed, 20 insertions(+), 83 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 032c5c32..b41ecacc 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -7,85 +7,3 @@ updates: time: "04:00" open-pull-requests-limit: 10 versioning-strategy: increase - ignore: - - dependency-name: content-range - versions: - - ">= 2.a, < 3" - - dependency-name: "@algoan/pubsub" - versions: - - 4.5.0 - - dependency-name: y18n - versions: - - 4.0.1 - - 4.0.2 - - dependency-name: "@nestjs/testing" - versions: - - 7.6.11 - - 7.6.12 - - 7.6.13 - - 7.6.14 - - 7.6.15 - - 7.6.7 - - 7.6.8 - - 7.6.9 - - dependency-name: "@nestjs/microservices" - versions: - - 7.6.11 - - 7.6.12 - - 7.6.13 - - 7.6.14 - - 7.6.15 - - 7.6.7 - - 7.6.8 - - 7.6.9 - - dependency-name: "@nestjs/core" - versions: - - 7.6.11 - - 7.6.12 - - 7.6.13 - - 7.6.14 - - 7.6.15 - - 7.6.7 - - 7.6.8 - - 7.6.9 - - dependency-name: "@nestjs/common" - versions: - - 7.6.11 - - 7.6.12 - - 7.6.13 - - 7.6.14 - - 7.6.15 - - 7.6.7 - - 7.6.8 - - 7.6.9 - - dependency-name: "@nestjs/platform-express" - versions: - - 7.6.11 - - 7.6.12 - - 7.6.13 - - 7.6.14 - - 7.6.15 - - 7.6.7 - - 7.6.8 - - 7.6.9 - - dependency-name: "@types/mocha" - versions: - - 8.2.0 - - 8.2.1 - - 8.2.2 - - dependency-name: node-notifier - versions: - - 8.0.1 - - 8.0.2 - - dependency-name: "@types/express" - versions: - - 4.17.11 - - dependency-name: jwt-decode - versions: - - 3.1.2 - - dependency-name: content-range - versions: - - 1.1.1 - - dependency-name: tslint - versions: - - 6.1.3 diff --git a/.github/workflows/test-and-publish.yaml b/.github/workflows/test-and-publish.yaml index 36c44062..410902bd 100644 --- a/.github/workflows/test-and-publish.yaml +++ b/.github/workflows/test-and-publish.yaml @@ -45,7 +45,26 @@ jobs: name: Lint all packages - run: npm run test:cov:all name: Launch tests for each packages - + dependabot: + permissions: + pull-requests: write + contents: write + runs-on: ubuntu-latest + if: github.event_name == 'pull_request' && github.actor == 'dependabot[bot]' + name: Auto-merge Dependabot PRs if tests pass and non-major version + needs: + - test + steps: + - name: Dependabot metadata + id: metadata + uses: dependabot/fetch-metadata@v1 + - name: Enable auto-merge for Dependabot PRs + if: 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.PUBLIC_REPO_GHA_PAT }} + publish: runs-on: ubuntu-latest if: ${{ github.ref == 'refs/heads/master' && github.event_name == 'workflow_dispatch' }}