Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Copilot Lvl 3
Message 1 of 5

using services with volumes seems pointless if they're instantiated before steps

services:
  postgres:
    image: postgres
    ports:
      - 5432:5432/tcp
    volumes:
      - ${{ github.workspace }}/ci/scripts/docker/postgres-setup.sh:/docker-entrypoint-initdb.d/postgres-setup.sh
  redis:
    image: redis
    ports:
      - 6379:6379/tcp

steps:
- uses: actions/checkout@v2-beta
 
I need to mount a path from checkout, but the containers get started before the step occurs.
4 Replies
Highlighted
GitHub Partner
Message 2 of 5

Re: using services with volumes seems pointless if they're instantiated before steps

@eedwards-sk ,

I aslo tested this syntax, and after using the syntax to specify volumes in the workflow:

jobs:
  test:
    name: Test
    runs-on: ubuntu-latest
    services:
      postgres:
        image: postgres
        ports: 
          - 5432:5432/tcp
        volumes:
          - ${{ github.workspace }}/gihub_sourceCode:$HOME/gihub/sourceCode
    steps:
    . . .

When trying to access the volumes in the container, it always returns the error "No such file or directory". Whether you also are facing the same problem?

 

I have reported this ticket to the appropriate engineering team, the team will evaluate and investigate this question. If they have any update, I will notify you in time, and sometimes the appropriate engineers may will directly reply you here.

Highlighted
GitHub Partner
Message 3 of 5

Re: using services with volumes seems pointless if they're instantiated before steps

@eedwards-sk ,

The appropriate engineering team has fixed this issue here , please check if the problem has done on your side.

If you have any other questions about this ticket, feel free to tell us.

Highlighted
Copilot Lvl 3
Message 4 of 5

Re: using services with volumes seems pointless if they're instantiated before steps

That doesn't appear to solve it, because the use case is different than mine.

 

I am not using the "container" form of running a container. I have CI scripts which get ran, that manage the docker run commands themselves.

Highlighted
GitHub Partner
Message 5 of 5

Re: using services with volumes seems pointless if they're instantiated before steps

@eedwards-sk ,

Sorry for that the problem still occurs.

I have tell this to the appropriate engineering team, the problem is under investigation.