diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 72d8dcde5c67b2afb572c40f2e034d6266dea8f5..12c4cdf8a0e3cdbbcca2590ef49808c0704d90ff 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -12,12 +12,12 @@ variables:
   GIT_DEPTH: "0"  # Tells git to fetch all the branches of the project, required by the analysis task
 
 default:
-  image: node:lts-slim
   cache:
     paths:
       - node_modules
 
 build:
+  image: node:lts-slim
   stage: build
   before_script: npm ci
   script: npm run build