forked from LackLuster-Labs/LumoraVR
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (38 loc) · 1.13 KB
/
Copy pathformat.yml
File metadata and controls
43 lines (38 loc) · 1.13 KB
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
33
34
35
36
37
38
39
40
41
42
43
name: .NET Format Validation
on:
pull_request:
branches:
- main
jobs:
format-check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
- name: Run dotnet format check
run: |
# Check formatting across the entire solution
dotnet format --verify-no-changes LumoraGodot/Aquamarine.sln
- name: Add format-issues label if formatting issues found
if: failure()
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['format-issues']
})
- name: Fail if formatting issues found
if: failure()
run: |
echo "::error::Code formatting check failed. Please run 'dotnet format' and commit the changes."
exit 1