Skip to content

Commit

Permalink
chore: optimize branch yml
Browse files Browse the repository at this point in the history
  • Loading branch information
zhoushaw committed Aug 3, 2024
1 parent a1a53c2 commit 34d34aa
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,17 @@ jobs:
- name: Check Dependency Version
run: pnpm run check-dependency-version

- name: Lint
run: pnpm run lint

- name: List files
run: |
echo "Changed files:"
git diff --name-only ${{ github.event.before }} ${{ github.sha }}
- name: Get list of changed files
id: changes
run: echo "$(git diff main...HEAD --name-only)" > changed_files.txt

- name: Display changed files
run: cat changed_files.txt

- name: Run Biome lint
run: |
if [ -s changed_files.txt ]; then
biome lint --files $(cat changed_files.txt) --diagnostic-level=warn --fix
else
echo "No changes detected"
fi

0 comments on commit 34d34aa

Please sign in to comment.