Skip to content

Docker Container Action - How to persist files in workspace #26963

Answered by Yanjingzhu
velsietis asked this question in Actions
Discussion options

You must be logged in to vote

When using a docker container action, there are some volumes configured in docker run command. 

Files inside container under /github/workspace are mapped to runner workspace /home/runner/work/my-repo-name/my-repo-name . And files inside container under /github/home are mapped to /home/runner/work/_temp/_github_home in runner machine. 

The files you created in entrypoint.sh will be persisted after the container has exited but the empty folder will not. 

In your workflow yml file upload artifacts actions, the path you specifed is wrong. 

$GITHUB_WORKSPACE and $HOME is the right syntax in bash script , it could not be replaced in upload artifacts path i…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants