forked from dotnet/maui
-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (43 loc) · 1.7 KB
/
dotnet-format-daily-main.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: Daily code format check
on:
workflow_dispatch:
schedule:
- cron: 0 0 * * * # Every day at midnight (UTC)
permissions:
pull-requests: write
contents: write
jobs:
dotnet-format:
runs-on: windows-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
ref: main
- name: Setup .NET Core SDK
uses: actions/[email protected]
with:
dotnet-version: 8.x
- name: Run dotnet format
run: dotnet format .\Microsoft.Maui.sln --no-restore --exclude Templates/src BlazorWebView/src/SharedSource/BlazorWebViewDeveloperTools.cs BlazorWebView/src/SharedSource/BlazorWebViewServiceCollectionExtensions.cs Graphics/src/Graphics.Win2D/W2DCanvas.cs Graphics/src/Graphics.Win2D/W2DExtensions.cs
- name: Commit files
if: steps.format.outputs.has-changes == 'true'
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git commit -a -m 'Automated dotnet-format update'
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
title: '[housekeeping] Automated PR to fix formatting errors'
body: |
Automated PR to fix formatting errors
committer: GitHub <[email protected]>
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
labels: |
t/housekeeping ♻︎
area-infrastructure
assignees: rmarinho, jsuarezruiz
reviewers: rmarinho, jsuarezruiz
branch: housekeeping/fix-codeformatting
base: main