Add clang-format-check GitHub action
diff --git a/.github/workflows/clang-format-check.yml b/.github/workflows/clang-format-check.yml
new file mode 100644
index 0000000..7183bb8
--- /dev/null
+++ b/.github/workflows/clang-format-check.yml
@@ -0,0 +1,12 @@
+name: Clang Format Checker
+on: [push]
+jobs:
+ clang-format-checking:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - uses: RafikFarhad/clang-format-github-action@v2.1.0
+ with:
+ style: file
+ sources: "apps/**/*.h,apps/**/*.c,examples/*.c,includes/**/*.h,src/**/*.h,src/**/*.c,tests/**/*.h,tests/**/*.c"
+ excludes: "apps/shared/iccjpeg.*"
diff --git a/README.md b/README.md
index d3f4e3e..1497c30 100644
--- a/README.md
+++ b/README.md
@@ -66,7 +66,9 @@
sources from the top-level folder:
```sh
-clang-format -i apps/*.c examples/*.c include/avif/*.h src/*.c tests/*.c
+clang-format -i apps/*.c apps/shared/avifjpeg.* apps/shared/avifpng.* \
+ apps/shared/avifutil.* apps/shared/y4m.* \
+ examples/*.c include/avif/*.h src/*.c tests/*.h tests/*.c
```
Use [cmake-format](https://github.com/cheshirekow/cmake_format) to format the