]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
ci: add clang-format action
authorEmil Velikov <emil.l.velikov@gmail.com>
Sun, 8 Sep 2024 10:38:13 +0000 (11:38 +0100)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Tue, 24 Sep 2024 14:59:20 +0000 (09:59 -0500)
To keep the style consistent.

Closes: https://github.com/kmod-project/kmod/issues/88
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/118
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
.github/workflows/clang-format.yml [new file with mode: 0644]

diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml
new file mode 100644 (file)
index 0000000..ba37207
--- /dev/null
@@ -0,0 +1,18 @@
+name: Check code style with clang-format
+
+on:
+  pull_request:
+    branches: [master]
+
+permissions:
+  contents: read
+
+jobs:
+  stylecheck:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
+      - run: git fetch --depth=1 origin ${{ github.event.pull_request.base.sha }}
+      - uses: yshui/git-clang-format-lint@a65b466f5903524aef27552f63c3906c0f73f184 # v1.16
+        with:
+          base: ${{ github.event.pull_request.base.sha }}