Skip to content

Commit

Permalink
Create dotnet-format.yml
Browse files Browse the repository at this point in the history
Add github action to check if new/touched file is formatted.
  • Loading branch information
andy840119 authored Jul 14, 2023
1 parent 55d24fc commit de976f9
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/dotnet-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Format check on pull request
on: pull_request

jobs:
dotnet-format:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Add dotnet-format problem matcher
uses: xt0rted/dotnet-format-problem-matcher@v1

- name: Restore dotnet tools
uses: xt0rted/dotnet-tool-restore@v1

- name: Run dotnet format
uses: xt0rted/dotnet-format@v1
with:
only-changed-files: true

0 comments on commit de976f9

Please sign in to comment.