diff --git a/templates/gitlab-ci-docker.yml b/templates/gitlab-ci-docker.yml
index 30830f1bf2f7ee183cffd18ecae123afa3f9cb33..6bef0c03e0610760ca4b46b9e7f45c62ed8746be 100644
--- a/templates/gitlab-ci-docker.yml
+++ b/templates/gitlab-ci-docker.yml
@@ -568,7 +568,11 @@ stages:
         }
         return enc
       }
-      !/# *nosubst/ {
+      /# *nosubst/ {
+        print $0
+        next
+      }
+      {
         orig_line = $0
         line = $0
         count_repl_in_line = 0