Skip to content

Commit

Permalink
Apply format if needed
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarfgp committed Nov 26, 2024
1 parent 8bd2605 commit 09908ce
Showing 1 changed file with 32 additions and 4 deletions.
36 changes: 32 additions & 4 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,34 @@ env:
CONFIG: Release

jobs:
format:
name: Format
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x

- run: dotnet tool restore

- name: Format
run: find . -name '*.fs' | xargs dotnet fantomas

- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Apply formatting"
commit_options: '--no-verify --signoff'
repository: .
skip_dirty_check: false
skip_fetch: false
skip_checkout: true
disable_globbing: true
create_branch: false

pull_request:
runs-on: ubuntu-latest
steps:
Expand All @@ -15,10 +43,10 @@ jobs:
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Check code formatting
run: |
dotnet tool restore
dotnet fantomas --check src
# - name: Check code formatting
# run: |
# dotnet tool restore
# dotnet fantomas --check src
- name: Restore
run: dotnet restore ${SLN_FILE}
- name: Build
Expand Down

0 comments on commit 09908ce

Please sign in to comment.