How to access a running container from an action

I have a workflow where I spin up a container within the runner, then I have a Docker action to run some integration tests. The issue I have is that from the action container I cannot call the service endpoint from the action

How could I have access to it ?

The easiest way would be to attach the container you’re starting to the job network (see job context), to which the runner also attaches all containers managed by the workflow:

docker run --network ${{ job.container.network }} --name my_container ...

The action container should then be able to access the container using the hostname my_container.