Skip to content

cant mount multiple volumes #55

@HarshadDGhorpade-eaton

Description

@HarshadDGhorpade-eaton

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions