From 0f352667f5d2f29a04562c8d7a964587b394f548 Mon Sep 17 00:00:00 2001 From: Julien Tanay Date: Sat, 2 Mar 2024 11:01:54 +0100 Subject: [PATCH] chore: use dependabot to bump oxlint rules --- .github/dependabot.yml | 7 +++++ .github/workflows/dependabot.yml | 53 ++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..af97a4d --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +version: 2 + +updates: + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/dependabot.yml b/.github/workflows/dependabot.yml new file mode 100644 index 0000000..c6bf281 --- /dev/null +++ b/.github/workflows/dependabot.yml @@ -0,0 +1,53 @@ +name: Dependabot Update oxc + +on: pull_request + +permissions: + pull-requests: write + contents: write + +env: + OXLINT_PACKAGE_NAME: oxlint + +jobs: + setup: + runs-on: ubuntu-latest + if: github.actor == 'dependabot[bot]' + outputs: + oxlint-updated: ${{ contains(steps.metadata.outputs.dependency-names, env.OXLINT_PACKAGE_NAME) }} + steps: + - name: Dependabot metadata + id: metadata + uses: dependabot/fetch-metadata@v1 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + + bump-oxlint-rules: + runs-on: ubuntu-latest + needs: setup + if: needs.setup.outputs.oxlint-updated == 'true' + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.ref }} + + - name: Install pnpm + uses: pnpm/action-setup@v2 + + - name: Set node + uses: actions/setup-node@v4 + with: + node-version-file: .node-version + cache: pnpm + registry-url: "https://registry.npmjs.org" + + - name: Install Dependencies + run: pnpm i + + - name: Bump oxlint rules + run: | + pnpm run generate + git config --global user.name "dependabot[bot]" + git config --global user.email "49699333+dependabot[bot]@users.noreply.github.com" + git commit -am "feat(oxlint): bump oxlint rules" + git push