-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Self-hosted runner .git ownership issue after push #196
Comments
I've been looking into this a bit. It seems the way to go about this (unfortunately) is that GitHub Docker Actions should indeed use Some references I could find:
If you think you have indeed setup your self-hosted runner in this manner, it would be helpful if you have some input on how you'd intend to implement the change for this action. |
For now, I run a post action shell script changing the ownership to the user used to execute the runner as a custom setting. I guess GitHub runner should probably do something similar at pre or post action runner hook: cleanup the work direction or changing its ownership. If the action is able to specify a UID/GID that will be used on the docker image to execute the action: I do not have enough GitHub action internal knowledge to known if it will work. |
Right - so the main issue is that setting USER in the Dockerfile might break the action (see the docs on this). But at the same time, the excessive comments in the still open issue actions/runner#434 shows that this is a common and known issue.
What do you think? You'd still prefer the custom addition of a UID/GID input to be used within the action? |
Independently of the issue, running the action commands under another user than root will close a security issue. Does running the container commands under a different UID than root (like in https://github.com/myoung34/docker-github-actions-runner/pull/223/files) will break anything? To summarise:
In any case, I can live with the workarounds proposed (except bullet point 2). |
The ownership left in
.git
configuration directory after push belongs toroot
:The self-hosted runner is not able to cleanup the repo checkout at next run.
Is it possible to allow to choose the uid/gid that will call git for the push?
The text was updated successfully, but these errors were encountered: