This commit is contained in:
TingluoHuang
2020-09-03 17:24:59 -04:00
parent 7da6739eae
commit 69aa8d8984
3 changed files with 5 additions and 4 deletions

View File

@@ -40,10 +40,6 @@ COPY ./src/Misc/jobstart.sh /actions-runner/jobstart.sh
COPY ./src/Misc/jobrunning.sh /actions-runner/jobrunning.sh
COPY ./src/Misc/jobcomplete.sh /actions-runner/jobcomplete.sh
# Allow runner to run as root
ENV RUNNER_ALLOW_RUNASROOT=1
RUN /actions-runner/download-runner.sh
RUN rm -f /actions-runner/download-runner.sh

View File

@@ -12,3 +12,4 @@ spec:
template:
spec:
setupDockerInDocker: true
imagePullPolicy: Always

View File

@@ -82,6 +82,10 @@ namespace GitHub.Runner.Worker.Handlers
var nodeRuntimeVersion = await StepHost.DetermineNodeRuntimeVersion(ExecutionContext);
string file = Path.Combine(HostContext.GetDirectory(WellKnownDirectory.Externals), nodeRuntimeVersion, "bin", $"node{IOUtil.ExeExtension}");
if (System.Environment.GetEnvironmentVariable("K8S_POD_NAME") != null)
{
file = Path.Combine(Path.Combine(HostContext.GetDirectory(WellKnownDirectory.Work), "__externals_copy"), nodeRuntimeVersion, "bin", $"node{IOUtil.ExeExtension}");
}
// Format the arguments passed to node.
// 1) Wrap the script file path in double quotes.