Mount volume from custom action - Docker


I am building a custom action using a docker image. In the dockerfile i have set a volume called /reports

How should i configure my action to mount that volume on my workspace?

This is my repo, it contains the action.yml, the Dockerfile and also the pipeline im running


I don’t think that’s supported. The working directory should automatically be set to the mounted workspace though, is there any problem with using that?

Yeah, im storing the report in a folder called /report, but i cant see this mounted in the workspace.

Maybe a volume is not the solution for this… Im storing a file inside the docker image with the report, and i want to archive that as an artefact, but i cant find it as the report folder is not accessible

Any suggestion?


Save the file in some place relative to the workspace, which is also the default working directory of the action container. The workspace is mounted into the container, so the file will be available at the same place (relative to the workspace) outside the action container.

So e.g. if you safe the file to report/ (note the lack of leading slash), you could then simply do:

- uses: actions/upload-artifact@v2
    name: report-artifact
    path: report/