Closed travis-cook-sfdc closed 1 year ago
Hi :slightly_smiling_face: First thing that comes to my mind is running a hook after job completes to clean up the problematic directory: https://docs.github.com/en/actions/hosting-your-own-runners/running-scripts-before-or-after-a-job Can this solve your issue? Whatever we decide to do for your case, I would do it after the action run and not before the next run since you won't need it between runs anyways.
I would like to avoid adding any additional step that is not necessary because it can slow down the action run, so I think it is better to call that additional cleanup only when you need it :slightly_smiling_face:
If you like the given solution, please test it and let me know if it works. If it doesn't, we will think of something else :slightly_smiling_face:
Ah yeah - that makes a lot of sense to me. I ended up using this action in order to clean up the directory: https://github.com/peter-murray/reset-workspace-ownership-action/blob/main/README.md
Happy to hear you managed to solve the issue :tada:
I'm working in a GitHub Enterprise environment that uses self-hosted machines to run github actions. The github actions are run under a non-root
foo
user. Because docker runs as a root / privileged user, thedist/
files this action creates end up on the host machine withroot
permissions. Then, when the action reruns, thefoo
user does not have permissions to checkout & cleanup the previously created files.Some ideas I've had to try to resolve this but figure I'd raise the issue here:
dist/
files from the shared volume regardless of success / failure status.dist/
folder to$userArgValue
What do you think would make the most sense given the issue?