-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: use dependabot to bump oxlint rules
- Loading branch information
Showing
2 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
version: 2 | ||
|
||
updates: | ||
- package-ecosystem: "npm" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |