Start database container with mounted config file in Github actions workflow

I’d like to run some integration tests against a real database, but I fail to start an additional container (for the db), because I need to mount a config file that is in my repo before it is starting up.

This is how I use the database on my local computer (docker-compose):

    image: tinkerpop/gremlin-server:3.5
    container_name: 'gremlin-server'
    entrypoint: ./bin/ conf/gremlin-server-config.yaml
      - graphdb_net
      - 8182:8182
      - ./conf/gremlin-server-config.yaml:/opt/gremlin-server/conf/gremlin-server-config.yaml
      - ./conf/

I guess I cannot use a service container as the code is not available at the time the service container is started, therefore it won’t pick up my configuration.

That’s why I tried to run a container on the host using --network host (see below) and the container seems to be running fine, still I’m not able to curl it.

- name: Start DB for tests
  run: |
    docker run -d \
    --network host \
    -v ${{ github.workspace }}/dev/conf/gremlin-server-config.yaml:/opt/gremlin-server/conf/gremlin-server-config.yaml \
    -v ${{ github.workspace }}/dev/conf/ \

- name: Test connection
  run: |
    curl "localhost:8182/gremlin?gremlin=g.V().valueMap()"

According to the documentation about the context of a job the id of the container network is available ({{}}) but it is empty if you don’t use any job-level service or container.

Any ideas what I could try next?