From cd91b284f7db5ac7bbfd81b51c6b69cf3ec1294a Mon Sep 17 00:00:00 2001 From: Saif Bechan Date: Tue, 16 Mar 2021 19:40:26 +0100 Subject: [PATCH] changed dependabot auto-merge and removed vercel --- .github/auto-merge.yml | 5 ----- .github/dependabot.yml | 14 ++++++++------ .github/workflows/main-cd.yml | 14 ++++++-------- .github/workflows/main-ci.yml | 30 ++++++++++++++++++++---------- package.json | 2 +- 5 files changed, 35 insertions(+), 30 deletions(-) delete mode 100644 .github/auto-merge.yml diff --git a/.github/auto-merge.yml b/.github/auto-merge.yml deleted file mode 100644 index c71f6073..00000000 --- a/.github/auto-merge.yml +++ /dev/null @@ -1,5 +0,0 @@ -updateBranch: true -deleteBranchAfterMerge: true -mergeMethod: rebase -requiredLabels: - - dependencies diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 9dcd1583..185c200f 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,8 +1,10 @@ version: 2 updates: -- package-ecosystem: npm - directory: "/" - schedule: - interval: daily - time: "04:00" - open-pull-requests-limit: 10 + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "daily" + rebase-strategy: "auto" + labels: + - "security" + - "dependencies" diff --git a/.github/workflows/main-cd.yml b/.github/workflows/main-cd.yml index fe729438..f9d7e245 100644 --- a/.github/workflows/main-cd.yml +++ b/.github/workflows/main-cd.yml @@ -2,23 +2,21 @@ name: saifbechan.github.io CD on: push: - branches: [ main ] + branches: [main] jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [14, 15] + worker: + runs-on: ubuntu-20.04 + steps: - uses: actions/checkout@v2 with: persist-credentials: false - name: Unit tests & Linters (Node ${{ matrix.node-version }}) - uses: actions/setup-node@v1 + uses: actions/setup-node@v2 with: - node-version: ${{ matrix.node-version }} + node-version: 15 - run: | yarn yarn tsc diff --git a/.github/workflows/main-ci.yml b/.github/workflows/main-ci.yml index c3f7a95f..f724b0d1 100644 --- a/.github/workflows/main-ci.yml +++ b/.github/workflows/main-ci.yml @@ -2,23 +2,21 @@ name: saifbechan.github.io CI on: pull_request: - branches: [ main ] + branches: [main] jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [14, 15] + worker: + runs-on: ubuntu-20.04 + steps: - uses: actions/checkout@v2 with: persist-credentials: false - name: Unit tests & Linters (Node ${{ matrix.node-version }}) - uses: actions/setup-node@v1 + uses: actions/setup-node@v2 with: - node-version: ${{ matrix.node-version }} + node-version: 15 - run: | yarn yarn tsc @@ -38,8 +36,20 @@ jobs: start: yarn start:test wait-on: http://localhost:3030 - - name: Dependabot auto-approve - uses: hmarr/auto-approve-action@v2.0.0 + - name: Auto merge + uses: actions/github-script@0.2.0 if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]' with: + script: | + github.pullRequests.createReview({ + owner: context.payload.repository.owner.login, + repo: context.payload.repository.name, + pull_number: context.payload.pull_request.number, + event: 'APPROVE' + }) + github.pullRequests.merge({ + owner: context.payload.repository.owner.login, + repo: context.payload.repository.name, + pull_number: context.payload.pull_request.number + }) github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/package.json b/package.json index a0dd8c6f..20dd152f 100644 --- a/package.json +++ b/package.json @@ -70,6 +70,6 @@ "webpack": "^5.25.1" }, "engines": { - "node": "^14 || ^15" + "node": ">=14" } }