How to mount/copy folder from the git repo to a service container

this gitlab baby is asking a complete beginner’s question, pls bear with me.
I am trying to copy (or should l say mount) a folder and a file from my git repo to an image in my gitlab-ci.yml file. I dont know how to do it. thats how l want to map it:

  volumes:
      - ./myfolder-templates:/templates
      - ./config/mysecondfolder/file.properties:/opt/classes/file.properties

my gitlab-ci.yml file looks like this:

     image: openjdk:11

     build-job:
      services: 
        - name: artifactory.mycompany.com/oracleimage
          alias: test_db
        - name: docker-releases.mycompany.com/anotherimage
          alias: test_other

now, i want to add the above mentioned file and folder to the container whose alias is test_other. How should l go about it? Is there a way to do that in the yml file? btw. im using a shared runner and cant configure it, in case that is relevant…