Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): fix dependabot support for oxlint bump #40

Merged
merged 1 commit into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,5 @@ updates:
directory: "/"
schedule:
interval: "weekly"
ignore:
- dependency-name: "oxlint"
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
dependency-name: "oxlint"
prefix-development: feat
labels:
- "bump-oxlint"
- "dependencies"
16 changes: 15 additions & 1 deletion .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,43 @@ permissions:
pull-requests: write
contents: write

env:
OXLINT_PACKAGE_NAME: oxlint

jobs:
bump-oxlint-rules:
runs-on: ubuntu-latest
if: github.event.label.name == 'bump-oxlint'
if: github.actor == 'dependabot[bot]' && github.event.label.name == 'dependencies'
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/checkout@v4
if: contains(steps.metadata.outputs.dependency-names, env.OXLINT_PACKAGE_NAME)
with:
ref: ${{ github.event.pull_request.head.ref }}

- name: Install pnpm
if: contains(steps.metadata.outputs.dependency-names, env.OXLINT_PACKAGE_NAME)
uses: pnpm/action-setup@v2

- name: Set node
if: contains(steps.metadata.outputs.dependency-names, env.OXLINT_PACKAGE_NAME)
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: pnpm
registry-url: "https://registry.npmjs.org"

- name: Install Dependencies
if: contains(steps.metadata.outputs.dependency-names, env.OXLINT_PACKAGE_NAME)
run: pnpm i

- name: Bump oxlint rules
if: contains(steps.metadata.outputs.dependency-names, env.OXLINT_PACKAGE_NAME)
run: |
# Generate rules from latest oxlint
pnpm run generate
Expand Down
Loading