File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,10 +44,16 @@ jobs:
4444 format :
4545 name : Format
4646 runs-on : ubuntu-latest
47+ if : github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
48+ permissions :
49+ contents : write
4750
4851 steps :
4952 - name : Checkout code
5053 uses : actions/checkout@v4
54+ with :
55+ ref : ${{ github.head_ref }}
56+ token : ${{ secrets.GITHUB_TOKEN }}
5157
5258 - name : Setup Bun
5359 uses : oven-sh/setup-bun@v2
6571 - name : Install dependencies
6672 run : bun install
6773
68- - name : Run format check
69- run : bunx biome ci --formatter-enabled=true --assist-enabled=true --linter-enabled=false --reporter=github .
74+ - name : Run formatter
75+ run : bun run format
76+
77+ - name : Commit formatting changes
78+ uses : stefanzweifel/git-auto-commit-action@v5
79+ with :
80+ commit_message : " style: apply biome formatting"
81+ commit_user_name : " github-actions[bot]"
82+ commit_user_email : " 41898282+github-actions[bot]@users.noreply.github.com"
7083
7184 knip :
7285 name : Knip
You can’t perform that action at this time.
0 commit comments