Skip to content

Configure JSON serializer #302

Configure JSON serializer

Configure JSON serializer #302

Workflow file for this run

name: Format
on:
# https://securitylab.github.com/resources/github-actions-preventing-pwn-requests/
pull_request_target:
paths:
- '**.editorconfig'
- '**.globalconfig'
- '**.cs'
- .github/workflows/formatter.yml
permissions:
contents: write
jobs:
format:
runs-on: ubuntu-latest
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v4
- name: Install the dotnet-format
# Installing the tool globally to avoid any interference from potentially malicious code checked out in the next step
run: dotnet tool install dotnet-format -g --version 5.1.250801
- name: Checkout repository
uses: actions/checkout@v4
with:
show-progress: false
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}
- name: Format scripts
run: dotnet-format --fix-whitespace --no-restore
- 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 || true