File tree Expand file tree Collapse file tree 2 files changed +50
-1
lines changed Expand file tree Collapse file tree 2 files changed +50
-1
lines changed Original file line number Diff line number Diff line change 1+ name : Check XAML Formatting
2+ on :
3+ workflow_dispatch :
4+ push :
5+ branches :
6+ - ' main'
7+ - ' **-servicing'
8+ paths :
9+ - ' **.xaml'
10+ pull_request :
11+ branches :
12+ - ' main'
13+ - ' **-servicing'
14+ paths :
15+ - ' **.xaml'
16+
17+ jobs :
18+ check-formatting :
19+ runs-on : ubuntu-latest
20+ defaults :
21+ run :
22+ shell : pwsh
23+ steps :
24+ - uses : actions/checkout@v3
25+ with :
26+ fetch-depth : 2
27+
28+ - name : Install Xaml Styler
29+ run : |
30+ dotnet tool install --global XamlStyler.Console
31+
32+ - name : Check Formatting
33+ id : check-step
34+ run : |
35+ $changedFiles = (git diff --name-only HEAD~1) -split "\n" | Where-Object {$_ -like "*.xaml"}
36+ foreach ($file in $changedFiles)
37+ {
38+ xstyler -p -l None -f $file
39+ if ($LASTEXITCODE -ne 0)
40+ {
41+ echo "::error file=$file::Format check failed"
42+ }
43+ }
44+ continue-on-error : true
45+
46+ - name : Fail job if necessary
47+ if : steps.check-step.outcome == 'failure'
48+ run : exit 1
49+
Original file line number Diff line number Diff line change 22<configuration >
33 <packageSources >
44 <add key =" NuGet official package source" value =" https://api.nuget.org/v3/index.json" />
5- <add key =" Local Packages" value =" src\ Files.App\ nupkgs\ " />
5+ <add key =" Local Packages" value =" src/ Files.App/ nupkgs/ " />
66 </packageSources >
77</configuration >
You can’t perform that action at this time.
0 commit comments