diff --git a/templates/gitlab-ci-k8s.yml b/templates/gitlab-ci-k8s.yml
index 65809dc8411e6c4b7e8053f7c56fab0a1c49ac6a..c60c911b70dedc89da49f323a296235698bdd39a 100644
--- a/templates/gitlab-ci-k8s.yml
+++ b/templates/gitlab-ci-k8s.yml
@@ -449,7 +449,11 @@ stages:
         }
         return enc
       }
-      !/# *nosubst/ {
+      /# *nosubst/ {
+        print $0
+        next
+      }
+      {
         orig_line = $0
         line = $0
         count_repl_in_line = 0