diff --git a/Dockerfile b/Dockerfile index a945115..e358372 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,4 @@ ARG SERVERCORE_VERSION="ltsc2022" -ARG RUNNER_VERSION="0.2.11" - FROM mcr.microsoft.com/windows/servercore:${SERVERCORE_VERSION} SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"] @@ -8,7 +6,6 @@ SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"] # disable telemetry ENV POWERSHELL_TELEMETRY_OPTOUT="1" - # Set working directory WORKDIR /actions-runner @@ -35,9 +32,8 @@ RUN choco install -y visualstudio2022buildtools --package-parameters \" \ # Add MSBuild to the path RUN [Environment]::SetEnvironmentVariable(\"Path\", $env:Path + \";C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\", \"Machine\") -ENV RUNNER_VERSION=${RUNNER_VERSION} -COPY install-runner.ps1 . -RUN .\install-runner.ps1; Remove-Item .\install-runner.ps1 -Force +ARG RUNNER_VERSION="0.2.11" +ADD https://gitea.com/gitea/act_runner/releases/download/v$RUNNER_VERSION/act_runner-$RUNNER_VERSION-windows-amd64.exe act_runner.exe COPY entrypoint.ps1 . ENTRYPOINT ["pwsh.exe", ".\\entrypoint.ps1"] \ No newline at end of file diff --git a/install-runner.ps1 b/install-runner.ps1 deleted file mode 100644 index f20f7d8..0000000 --- a/install-runner.ps1 +++ /dev/null @@ -1 +0,0 @@ -Invoke-WebRequest -Uri "https://gitea.com/gitea/act_runner/releases/download/v$env:RUNNER_VERSION/act_runner-$env:RUNNER_VERSION-windows-amd64.exe" -OutFile "act_runner.exe" \ No newline at end of file