Skip to content

Commit

Permalink
ci: add clang-format process into ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
liuxiang committed Jan 4, 2024
1 parent 12e908b commit ae553c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ jobs:
- name: Install Clang-Format manually
run: brew install clang-format

- name: Run Clang-Format on git diff
- name: Find modified files and format
run: |
git diff --name-only --diff-filter=d | grep -E '\.(cpp|cc|h|hpp)$' | xargs clang-format -i -style=file
git diff --name-only --diff-filter=d ${{ github.event.before }} ${{ github.sha }} | grep '\.\(cpp\|cc\|h\|hpp\)$' | xargs clang-format -i
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
Expand Down

0 comments on commit ae553c1

Please sign in to comment.