@@ -37,27 +37,28 @@ jobs:
37
37
dotnet-version : ${{ vars.DOTNET_SDK_VERSION }}
38
38
- name : Install dotnet-format tool
39
39
run : dotnet tool install -g dotnet-format
40
- - run : |
40
+ - name : Validate with .NET ${{ vars.DOTNET_SDK_VERSION }}
41
+ run : |
41
42
dotnet format whitespace --verify-no-changes --verbosity diagnostic
42
43
dotnet format style --verify-no-changes --verbosity diagnostic
43
44
dotnet format analyzers --verify-no-changes --diagnostics IDE0073 --verbosity diagnostic
44
45
id : validate
45
46
continue-on-error : true
46
47
working-directory : ${{ github.workspace }}
47
- - run : |
48
+ - name : Format with .NET ${{ vars.DOTNET_SDK_VERSION }}
49
+ if : ${{ steps.validate.outcome != 'success' }}"
50
+ run : |
48
51
dotnet format whitespace --verbosity diagnostic
49
52
dotnet format style --verbosity diagnostic
50
53
dotnet format analyzers --diagnostics IDE0073 --verbosity diagnostic
51
- name: Apply style formatting and file header rule
52
- if: ${{ steps.validate.outcome != 'success' }}"
53
54
working-directory : ${{ github.workspace }}
54
- - run : |
55
+ - name : Push to ${{ github.ref }}
56
+ if : ${{ steps.validate.outcome != 'success' }}"
57
+ run : |
55
58
git add .
56
59
git config user.name "$(git log -n 1 --pretty=format:%an)"
57
60
git config user.email "$(git log -n 1 --pretty=format:%ae)"
58
61
git commit -m "applied file header rule"
59
62
git pull origin ${{ github.ref }}
60
63
git push origin ${{ github.ref }}
61
- name: Push style formatting and file header rule to ${{ github.ref }}
62
- if: ${{ steps.validate.outcome != 'success' }}"
63
64
working-directory : ${{ github.workspace }}
0 commit comments