diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9484ac0ebd36cedf5a9c0441c3213296f6ecedfd..aa575210d899c687271d02401e95a0228eb4f89f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -129,9 +129,9 @@ lint-open-api-version:
     - 'apk --no-cache add bash wget'
     - 'wget https://github.com/mikefarah/yq/releases/download/v${VERSION}/${BINARY} -O /usr/bin/yq && chmod +x /usr/bin/yq'
   script:
-    - yq '.externalDocs.url' ./.docs/.openapi/api.base.yaml | grep "${DOC_VERSION}" > ./openapi-doc-version.txt
+    - yq '.externalDocs.url' ./.docs/.openapi/api.base.yaml | grep -o "${DOC_VERSION}" > ./openapi-doc-version.txt
     - diff ./openapi-doc-version.txt ./doc-version.txt
-    - yq '.info.version' ./.docs/.openapi/api.base.yaml | grep "${APP_VERSION}" > ./openapi-app-version.txt
+    - yq '.info.version' ./.docs/.openapi/api.base.yaml | grep -o "${APP_VERSION}" > ./openapi-app-version.txt
     - diff ./openapi-app-version.txt ./app-version.txt
 
 build-metadata-service: