File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 99 - main
1010
1111jobs :
12+ prettier :
13+ runs-on : ubuntu-latest
14+ permissions :
15+ contents : write
16+ steps :
17+ - name : Checkout
18+ uses : actions/checkout@v6
19+ - name : Setup bun
20+ uses : oven-sh/setup-bun@v2
21+ with :
22+ bun-version : latest
23+ - name : Run prettier
24+ run : bunx prettier@v3 -w .
25+ - name : Commit if changed
26+ if : github.event_name == 'pull_request'
27+ run : |
28+ if [[ -n "$(git status --porcelain)" ]]; then
29+ git config user.name "github-actions[bot]"
30+ git config user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"
31+ git add .
32+ git commit -m "chore: format code with prettier" -m 'skip ci'
33+ git push origin "$(git branch --show-current)"
34+ else
35+ echo "No changes to commit"
36+ fi
37+
1238 checks :
1339 permissions :
1440 contents : read
You can’t perform that action at this time.
0 commit comments