diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a752439b6b2bde750e369d51cbaa9bf2ecb3463b..6ed56d7ca9b71c8007c2b810b073e865f73e5ad9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1519,6 +1519,9 @@ clang-tidy:
   - cmake . -LAH
   - utilities/filterCompileCommands.py compile_commands.json
   - run-clang-tidy.py -quiet | tee clang-tidy-output.txt
+  except:
+    variables:
+    - $DISABLE_PER_COMMIT_BUILDS
   artifacts:
     paths:
     - $CI_PROJECT_DIR/build/clang-tidy-output.txt