Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add workflow to format whitespaces #236

Merged
merged 19 commits into from
Oct 20, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/formatter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Format

on:
pull_request:
paths: ['**.cs']
push:
winstxnhdw marked this conversation as resolved.
Show resolved Hide resolved
paths: ['**.cs']

permissions:
contents: write

jobs:
format:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x

- name: Format scripts
run: dotnet tool run dotnet-format --fix-whitespace
winstxnhdw marked this conversation as resolved.
Show resolved Hide resolved

- name: Set Git config
run: |
git config user.name 'octocat'
git config user.email '[email protected]'

- name: Commit changes
run: |
git add .
git commit -m "style: fix whitespaces" | true
git push
winstxnhdw marked this conversation as resolved.
Show resolved Hide resolved