File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -290,7 +290,14 @@ if [[ ${_RUN_AS_ROOT} == "true" ]]; then
290290else
291291 if [[ $( id -u) -eq 0 ]]; then
292292 [[ -n " ${_CONFIGURED_ACTIONS_RUNNER_FILES_DIR} " ]] && chown -R runner " ${_CONFIGURED_ACTIONS_RUNNER_FILES_DIR} "
293- chown -R runner " ${_RUNNER_WORKDIR} " /actions-runner
293+ # /actions-runner/{bin,externals} ship runner-owned from the image
294+ # (~380 MB / 9k+ files). Recursing over them triggers overlay copy-up
295+ # per file even when ownership already matches, which dominates startup
296+ # under parallel runners. Only config.sh (run as root earlier) may have
297+ # written new root-owned files at the top level — chown those plus
298+ # /actions-runner itself and ${_RUNNER_WORKDIR}, but not the big dirs.
299+ chown runner /actions-runner " ${_RUNNER_WORKDIR} "
300+ find /actions-runner -mindepth 1 -maxdepth 1 ! -name bin ! -name externals -exec chown -R runner {} + 2> /dev/null || true
294301 # The toolcache is not recursively chowned to avoid recursing over prepulated tooling in derived docker images
295302 chown runner /opt/hostedtoolcache/
296303 if [[ ${_DEBUG_ONLY} == " true" ]] || [[ ${_DEBUG_OUTPUT} == " true" ]] ; then
You can’t perform that action at this time.
0 commit comments