chore(deps): update actions/setup-dotnet action to v4.1.0 #912
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Format | |
on: | |
push: | |
branches: main | |
paths: | |
- .github/workflows/formatter.yml | |
- .editorconfig | |
- lc-hax/Scripts/**/*.cs | |
pull_request_target: | |
paths: | |
- .github/workflows/formatter.yml | |
- .editorconfig | |
- lc-hax/Scripts/**/*.cs | |
permissions: | |
contents: write | |
jobs: | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/[email protected] | |
with: | |
show-progress: false | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
ref: ${{ github.head_ref }} | |
- name: Cache .NET tools | |
uses: actions/[email protected] | |
with: | |
path: ~/.nuget/packages | |
key: dotnet-tools-${{ runner.os }}-${{ hashFiles('.config/dotnet-tools.json') }} | |
restore-keys: dotnet-tools-${{ runner.os }}- | |
- name: Setup .NET | |
uses: actions/[email protected] | |
with: | |
dotnet-version: 8.0.x | |
- name: Restore tools | |
run: dotnet tool restore | |
- name: Format scripts | |
run: | | |
dotnet format lc-hax | |
dotnet format analysers | |
- name: Set Git config | |
run: | | |
git config user.email github-actions[bot]@users.noreply.github.com | |
git config user.name github-actions[bot] | |
- name: Commit changes | |
run: | | |
git add . | |
git commit -m "style: format scripts" || true | |
git push |