Skip to content

Commit 0c894ae

Browse files
Move format and lint-fix from ci.yml to format.yml
1 parent 25c6595 commit 0c894ae

2 files changed

Lines changed: 30 additions & 16 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,6 @@ jobs:
1515
fetch-depth: 0
1616
persist-credentials: true
1717

18-
- name: Run code formatter and commit changes
19-
run: |
20-
# Run project formatter
21-
.\format.ps1
22-
# Configure Git for automated commits
23-
git config user.name "github-actions[bot]"
24-
git config user.email "github-actions[bot]@users.noreply.github.com"
25-
$changes = git status --porcelain
26-
if ($changes) {
27-
git add -A
28-
git commit -m "chore: format and lint with Clang."
29-
git push
30-
} else {
31-
Write-Host "No changes to commit"
32-
}
33-
3418
- name: Build interpreter and extensions
3519
run: .\build.ps1
3620

.github/workflows/format.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Format and lint-fix
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
format-windows:
9+
runs-on: windows-latest
10+
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
persist-credentials: true
17+
18+
- name: Run code formatter and commit changes
19+
run: |
20+
.\format.ps1
21+
git config user.name "github-actions[bot]"
22+
git config user.email "github-actions[bot]@users.noreply.github.com"
23+
$changes = git status --porcelain
24+
if ($changes) {
25+
git add -A
26+
git commit -m "chore: format and lint with Clang. [skip ci]"
27+
git push
28+
} else {
29+
Write-Host "No changes to commit"
30+
}

0 commit comments

Comments
 (0)