-
Notifications
You must be signed in to change notification settings - Fork 7
49 lines (39 loc) · 1.02 KB
/
dotnet-format.yml
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
44
45
46
47
48
49
name: .NET Format
on:
push:
branches:
- 'dev'
paths:
- '**.cs'
- '**.yml' # assume ci/cd pipeline changes
jobs:
format:
runs-on: windows-latest
permissions:
contents: write
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_NOLOGO: true
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.FUYU_WORKFLOWS }}
ref: ${{ github.head_ref }}
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: .NET restore
run: dotnet restore --nologo --configfile Nuget.config
- name: .NET clean
run: dotnet clean --nologo
- name: .NET format
run: dotnet format --no-restore
- name: Push changes
run: |
git config user.name "github-actions[bot]"
git config user.email "170472707+github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "[skip CI] CI/CD: format code"
git push