Skip to content

Github Actions: Mounting volumes to retrieve downloaded files #2315

Answered by hikouki-gumo
hikouki-gumo asked this question in Q&A
Discussion options

You must be logged in to vote

After a while, seems I found reason.

When job_container starts, its folder $GITHUB_WORKSPACE is mounted to folder ${{ github/workspace }} of runner machine. Please note that in Github actions until this time, ${{ github/workspace }} is different from $GITHUB_WORKSPACE.

Then when docker run, I have to mount runner machine insteads of job_container workspace, the command should be:

docker run --rm -d -p 4444:4444 -p 7900:7900 --network ${{ job.container.network }} --network-alias standalone-selenium --shm-size="2g" -v "${{ github.workspace }}/target/Downloads":"/home/seluser/Downloads"  selenium/standalone-chrome:latest

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by hikouki-gumo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant