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

Checkout not properly cleanup when running in Container #628

Closed
peara opened this issue Jul 19, 2020 · 4 comments
Closed

Checkout not properly cleanup when running in Container #628

peara opened this issue Jul 19, 2020 · 4 comments

Comments

@peara
Copy link

peara commented Jul 19, 2020

I have a project running Github Action with a self-hosted runner.
It has 2 workflows, 1 for test and 1 for build.
It was working fine until when I change the test workflow to be run with container.
The build workflow won't be able to run because somehow the code directory changed owner to root.

After checking the document of Github Action, I found out that when run inside container, all actions will be performed as root.
But I think checkout action should have cleanup the code folder after running.
So I'm not sure this is a issue with checkout action or the Github Action runner.

Screenshot:
Screenshot_20200719_225842

@ericsciple
Copy link
Collaborator

Transferring to the runner repo for input

@ericsciple ericsciple transferred this issue from actions/checkout Jul 31, 2020
@mickem
Copy link

mickem commented Dec 1, 2020

I ran into this myself and solved it with subuid (https://docs.docker.com/engine/security/userns-remap/). This ensures the container has the correct uid and thus the files are owned by the github runner instead of root. This is not really a "github actions issue" as you will run into this issue with pretty much any "docker based CI solution".

@j3parker
Copy link

j3parker commented Dec 1, 2020

Probably the same issue as #434 ?

@nikola-jokic
Copy link
Contributor

I ran into this myself and solved it with subuid (https://docs.docker.com/engine/security/userns-remap/). This ensures the container has the correct uid and thus the files are owned by the github runner instead of root. This is not really a "github actions issue" as you will run into this issue with pretty much any "docker based CI solution".

You are right! I am closing this issue now because unfortunately, we cannot change anything within the runner repository. These permissions should be set by the user running the actions/runner.

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

5 participants