From ccfa5749e94181bfd620a196f03a607bc9aeaf83 Mon Sep 17 00:00:00 2001 From: nodecaf <49378662+nodecaf@users.noreply.github.com> Date: Fri, 20 Sep 2024 09:27:46 +1000 Subject: [PATCH] Fix actions-runner ownership Ensure that github user owns actions-runner dir --- github/actions/self-hosted-runner/dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/github/actions/self-hosted-runner/dockerfile b/github/actions/self-hosted-runner/dockerfile index 457265ae3..b270f53c5 100644 --- a/github/actions/self-hosted-runner/dockerfile +++ b/github/actions/self-hosted-runner/dockerfile @@ -32,8 +32,11 @@ RUN useradd -m github && \ usermod -aG sudo github && \ echo "%sudo ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers -USER github + WORKDIR /actions-runner +RUN chown github . +USER github + RUN curl -Ls https://github.com/actions/runner/releases/download/v${RUNNER_VERSION}/actions-runner-linux-x64-${RUNNER_VERSION}.tar.gz | tar xz \ && sudo ./bin/installdependencies.sh @@ -43,4 +46,4 @@ RUN sudo chmod u+x /actions-runner/entrypoint.sh #working folder for the runner RUN sudo mkdir /work -ENTRYPOINT ["/actions-runner/entrypoint.sh"] \ No newline at end of file +ENTRYPOINT ["/actions-runner/entrypoint.sh"]