From 996ef2fc0b494f6b86c40ed170430267593bf236 Mon Sep 17 00:00:00 2001 From: Tony Date: Fri, 22 Mar 2024 11:35:00 +0800 Subject: [PATCH] chore: add dependabot config and automerge --- .github/dependabot.yml | 17 ++++++++++++++++ .github/workflows/ci.yml | 43 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/ci.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..8a21cf88d --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,17 @@ +version: 2 +updates: + - package-ecosystem: npm + directory: '/' + schedule: + interval: daily + open-pull-requests-limit: 10 + labels: + - dependencies + + - package-ecosystem: 'github-actions' + directory: '/' + schedule: + interval: daily + open-pull-requests-limit: 10 + labels: + - dependencies diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..b635f2143 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,43 @@ +name: CI +on: + push: + branches: ['main'] + pull_request: + branches: ['main'] + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install pnpm + uses: pnpm/action-setup@v3 + with: + version: 8 + - name: Use Node.js Active LTS + uses: actions/setup-node@v4 + with: + node-version: lts/* + cache: 'pnpm' + - name: Install dependencies + run: pnpm i + - name: Build docs + run: pnpm run docs:build + + automerge: + if: github.triggering_actor == 'dependabot[bot]' && github.event_name == 'pull_request' + needs: build + runs-on: ubuntu-latest + permissions: + pull-requests: write + contents: write + steps: + - uses: fastify/github-action-merge-dependabot@v3 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + target: minor