Skip to content

Commit 2914f1f

Browse files
Update format.yml
1 parent dc41f92 commit 2914f1f

1 file changed

Lines changed: 16 additions & 5 deletions

File tree

.github/workflows/format.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,32 @@
11
name: Format
22

33
on:
4-
push:
5-
branches: ["master"]
64
pull_request:
75
branches: ["master"]
86

7+
permissions:
8+
contents: write
9+
910
jobs:
1011
format:
1112
runs-on: windows-latest
1213

1314
steps:
14-
- uses: actions/checkout@v3
15+
- uses: actions/checkout@v4
16+
with:
17+
ref: ${{ github.head_ref }}
18+
token: ${{ secrets.GITHUB_TOKEN }}
1519

1620
- name: Setup .NET
1721
uses: actions/setup-dotnet@v4
1822
with:
19-
dotnet-version: 9
23+
dotnet-version: 8
24+
2025
- name: Run dotnet format
21-
run: dotnet format whitespace --verify-no-changes --exclude 'Maple2.Server.World/Migrations/*.cs'
26+
run: dotnet format whitespace --exclude 'Maple2.Server.World/Migrations/*.cs'
27+
28+
- name: Commit changes
29+
if: github.event_name != 'pull_request' || github.repository == github.event.pull_request.head.repo.full_name
30+
uses: stefanzweifel/git-auto-commit-action@v5
31+
with:
32+
commit_message: "style: auto-format whitespace"

0 commit comments

Comments
 (0)