diff --git a/templates/gitlab-ci-python.yml b/templates/gitlab-ci-python.yml
index bc3f7f7f4ab0330d591e4a147f76cd7080e7aa93..2dd59e4b8b5d5be53431304d2894b44a7825bd62 100644
--- a/templates/gitlab-ci-python.yml
+++ b/templates/gitlab-ci-python.yml
@@ -817,7 +817,7 @@ stages:
       - ${POETRY_CACHE_DIR}
       - ${PIPENV_CACHE_DIR}
   before_script:
-    - *python-scripts
+    - !reference [.python-scripts]
     - install_ca_certs "${CUSTOM_CA_CERTS:-$DEFAULT_CA_CERTS}"
     - cd ${PYTHON_PROJECT_DIR}
     - guess_build_system