Skip to content

Commit

Permalink
ci(lint): invoke zhlint on changed files only
Browse files Browse the repository at this point in the history
  • Loading branch information
3fuyang committed Nov 6, 2023
1 parent 34317f4 commit 724233a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: lint

on:
pull_request:
push:
branches:
- main
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -45,7 +48,10 @@ jobs:
- name: Lint with zhlint
if: steps.changed-markdown-files.outputs.any_changed == 'true'
run: |
npx zhlint ${{ steps.changed-markdown-files.outputs.all_changed_files }}
npm run config:zhlint
for file in ${{ steps.changed-markdown-files.outputs.all_changed_files }}; do
npx zhlint $file
done
- name: Lint with autocorrect
if: steps.changed-markdown-files.outputs.any_changed == 'true'
Expand Down

0 comments on commit 724233a

Please sign in to comment.