-
Notifications
You must be signed in to change notification settings - Fork 1
32 lines (28 loc) · 783 Bytes
/
Copy pathformat.yml
File metadata and controls
32 lines (28 loc) · 783 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: Format and lint-fix
on:
push:
pull_request:
jobs:
format-windows:
runs-on: windows-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: true
- name: Run code formatter and commit changes
run: |
.\format.ps1
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
$changes = git status --porcelain
if ($changes) {
git add -A
git commit -m "chore: format and lint with Clang. [skip ci]"
git push
} else {
Write-Host "No changes to commit"
}