fix act_runner downloading

This commit is contained in:
mullayanov
2025-04-17 12:33:55 +05:00
parent 2c64df53c4
commit 2ff7d3ee64
2 changed files with 2 additions and 7 deletions

View File

@@ -1,6 +1,4 @@
ARG SERVERCORE_VERSION="ltsc2022" ARG SERVERCORE_VERSION="ltsc2022"
ARG RUNNER_VERSION="0.2.11"
FROM mcr.microsoft.com/windows/servercore:${SERVERCORE_VERSION} FROM mcr.microsoft.com/windows/servercore:${SERVERCORE_VERSION}
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"] SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"]
@@ -8,7 +6,6 @@ SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"]
# disable telemetry # disable telemetry
ENV POWERSHELL_TELEMETRY_OPTOUT="1" ENV POWERSHELL_TELEMETRY_OPTOUT="1"
# Set working directory # Set working directory
WORKDIR /actions-runner WORKDIR /actions-runner
@@ -35,9 +32,8 @@ RUN choco install -y visualstudio2022buildtools --package-parameters \" \
# Add MSBuild to the path # Add MSBuild to the path
RUN [Environment]::SetEnvironmentVariable(\"Path\", $env:Path + \";C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\", \"Machine\") RUN [Environment]::SetEnvironmentVariable(\"Path\", $env:Path + \";C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\", \"Machine\")
ENV RUNNER_VERSION=${RUNNER_VERSION} ARG RUNNER_VERSION="0.2.11"
COPY install-runner.ps1 . ADD https://gitea.com/gitea/act_runner/releases/download/v$RUNNER_VERSION/act_runner-$RUNNER_VERSION-windows-amd64.exe act_runner.exe
RUN .\install-runner.ps1; Remove-Item .\install-runner.ps1 -Force
COPY entrypoint.ps1 . COPY entrypoint.ps1 .
ENTRYPOINT ["pwsh.exe", ".\\entrypoint.ps1"] ENTRYPOINT ["pwsh.exe", ".\\entrypoint.ps1"]

View File

@@ -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"