Skip to content

Commit 9c01602

Browse files
Update ci.yml for format.ps1.
1 parent ac9a678 commit 9c01602

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,25 @@ jobs:
1111
steps:
1212
- name: Checkout code
1313
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+
# 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+
}
1433
1534
- name: Build interpreter and extensions
1635
run: .\build.ps1

0 commit comments

Comments
 (0)