mirror of
https://github.com/actions/runner.git
synced 2026-01-06 10:07:27 +08:00
fix node
This commit is contained in:
@@ -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/jobrunning.sh /actions-runner/jobrunning.sh
|
||||||
COPY ./src/Misc/jobcomplete.sh /actions-runner/jobcomplete.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 /actions-runner/download-runner.sh
|
||||||
RUN rm -f /actions-runner/download-runner.sh
|
RUN rm -f /actions-runner/download-runner.sh
|
||||||
|
|
||||||
|
|||||||
@@ -12,3 +12,4 @@ spec:
|
|||||||
template:
|
template:
|
||||||
spec:
|
spec:
|
||||||
setupDockerInDocker: true
|
setupDockerInDocker: true
|
||||||
|
imagePullPolicy: Always
|
||||||
@@ -82,6 +82,10 @@ namespace GitHub.Runner.Worker.Handlers
|
|||||||
|
|
||||||
var nodeRuntimeVersion = await StepHost.DetermineNodeRuntimeVersion(ExecutionContext);
|
var nodeRuntimeVersion = await StepHost.DetermineNodeRuntimeVersion(ExecutionContext);
|
||||||
string file = Path.Combine(HostContext.GetDirectory(WellKnownDirectory.Externals), nodeRuntimeVersion, "bin", $"node{IOUtil.ExeExtension}");
|
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.
|
// Format the arguments passed to node.
|
||||||
// 1) Wrap the script file path in double quotes.
|
// 1) Wrap the script file path in double quotes.
|
||||||
|
|||||||
Reference in New Issue
Block a user