aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/ci-format.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/ci-format.yml')
-rw-r--r--.github/workflows/ci-format.yml25
1 files changed, 25 insertions, 0 deletions
diff --git a/.github/workflows/ci-format.yml b/.github/workflows/ci-format.yml
new file mode 100644
index 0000000000..4531c824ce
--- /dev/null
+++ b/.github/workflows/ci-format.yml
@@ -0,0 +1,25 @@
+name: Format
+on:
+ push:
+ branches:
+ - master
+ # Run formatter against the forked branch, but
+ # do not allow access to secrets
+ # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflows-in-forked-repositories
+ pull_request:
+
+env:
+ SDK_VERSION: "10.0.x"
+
+jobs:
+ format-check:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
+
+ - uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
+ with:
+ dotnet-version: ${{ env.SDK_VERSION }}
+
+ - name: Run DotNet Format
+ run: dotnet format --verify-no-changes --verbosity minimal