From 8240d4f69984b0930c34860d36b02703e0f757d7 Mon Sep 17 00:00:00 2001 From: Yuta Matsumura Date: Mon, 12 Aug 2024 18:30:56 +0900 Subject: [PATCH] chore: Add .NET 8.0 dotnet-format GitHub Action workflow --- .../workflows/net80-dotnet-format-action.yml | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/net80-dotnet-format-action.yml diff --git a/.github/workflows/net80-dotnet-format-action.yml b/.github/workflows/net80-dotnet-format-action.yml new file mode 100644 index 0000000..fbc3923 --- /dev/null +++ b/.github/workflows/net80-dotnet-format-action.yml @@ -0,0 +1,38 @@ +# https://github.com/marketplace/actions/dotnet-format-on-pull-request +name: .NET 8.0 tsubakimoto/action-dotnet-format + +on: + # pull_request: + # branches: + # - main + # paths: + # - 'dotnet/net8.0/**' + workflow_dispatch: + +permissions: + contents: write + pull-requests: write + +jobs: + run-dotnet-format: + runs-on: ubuntu-latest + defaults: + run: + working-directory: 'dotnet/net8.0' + steps: + - uses: actions/checkout@v4 + - name: Setup .NET SDK + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '8.0.x' + - name: Format + id: format + uses: tsubakimoto/action-dotnet-format@v1.0.0 + with: + base-branch: ${{ github.head_ref }} + project-path: 'consoleapp/consoleapp.csproj' + - name: Output + run: | + echo "head-branch: ${{ steps.format.outputs.head-branch }}" + echo "changed: ${{ steps.format.outputs.changed }}" + echo "pull-request-url: ${{ steps.format.outputs.pull-request-url }}"