Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cant mount multiple volumes #55

Open
HarshadDGhorpade-eaton opened this issue May 27, 2024 · 1 comment
Open

cant mount multiple volumes #55

HarshadDGhorpade-eaton opened this issue May 27, 2024 · 1 comment

Comments

@HarshadDGhorpade-eaton
Copy link

Happened to find this action as we need to run some steps in container and some on host.

I am trying to mount multiple volumes but see only one is getting mounted i.e. -v ${{ github.workspace }}:/work, may I know what's reason and how to make it possible to mount more than one volumes on container.

- uses: addnab/docker-run-action@v3
      with:
        username: ${{ secrets.GH_USER }}
        password: ${{ secrets.GH_TOKEN }}
        registry: ghcr.io
        image: ghcr.io/orga/image:tag
        options: -v ${{ github.workspace }}:/work -v /cache_on_host:/cache_on_container -v /cache_2_on_host:/cache_2_on_container --workdir /work
        run: |
          ls -lash /work      # works
          echo -e "Listing files in /cache_on_container"
          ls -lash /cache_on_container       # doesnt work

          echo -e "Listing files in /cache_2_on_container"
          ls -lash /cache_2_on_container       # doesnt work

the docker run command as well doesnt list 2nd, 3rd volume mount options.

given usecase is not possible with this action or I am missing something? TIA.

@evandrocoan
Copy link

I do not think you have access to /cache_on_host on the GitHub actions machine; this is why it is not being mounted.

Can you try using a normal action and see if you can create and access /cache_on_host?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants