diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index bede6321eb863314ecd1aee1b854f41451b4aa7b..9bcd94ba507ce633bf478bd257369edf22504674 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -73,7 +73,16 @@ style:
   script:
     - *prepare_style
     - pre-commit run --all-files
-
+  after_script:
+    - |
+      git diff --output=style.patch --exit-code || {
+         cat style.patch
+         false
+      }
+  artifacts:
+    when: on_failure
+    paths:
+      - style.patch
 
 test-bullseye:
   stage: test