-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Black Github action causes subsequent actions to fail on self-hosted runner #3708
Comments
Seen it. Fairly common and really annoying. Especially for larger organizations with shared runner infrastructure where it is impossible to make sure no one uses this action. |
Seems like we should just have some code in https:/psf/black/blob/main/action/main.py that deletes |
Hey guys, I've made a PR here #3759 but have had a tough time replicating the issue. @swistakm could you try replicate this on your side with my fork (https:/cjproud/black) or this PR? |
@cjproud the PR you've mentions seems to do the job. |
I'm running a couple of GHA jobs, one of them being the black formatter inside an Ubuntu container on a self-hosted runner. I've noticed that after running the black formatting action there are files leftover in the
_actions
directory that aren't owned by the runner's user but rather byroot
:If the GitHub Action runner isn't running as
root
, which the default isn't, subsequent actions will fail because they run as the action's user and notroot
with the error above. I can fix this by running the GitHub Action runner asroot
but that feels a bit suboptimal.Has anyone else seen this behaviour? Appreciate your insight.
The text was updated successfully, but these errors were encountered: