Add Windows runner profiles and configuration for Gitea CI

- Introduced Dockerfiles for various Windows runner profiles: C/C++, .NET, Go, and MSYS.
- Added a PowerShell script to start the Gitea runner with appropriate configurations.
- Updated Ansible host variables to include new Windows build root and runner configurations.
- Enhanced the Windows Gitea runner role to support multiple execution modes (linux_podman and windows_mcr).
- Implemented tasks to validate runner execution modes, ensure necessary services are running, and manage Docker containers for Windows runners.
- Created a new task file for managing Windows-specific runner operations.
- Updated the configuration template to dynamically set paths for runner files and cache directories.
This commit is contained in:
2026-07-03 00:18:20 +02:00
parent e59a832d5d
commit c4d1db3a91
12 changed files with 920 additions and 6 deletions
@@ -0,0 +1,22 @@
FROM mcr.microsoft.com/windows/servercore:ltsc2022
SHELL ["powershell", "-NoProfile", "-ExecutionPolicy", "Bypass", "-Command"]
# Base image for Windows Gitea runners with Git for Windows tools and gitea runner.
ARG ACT_RUNNER_VERSION=2.0.0
RUN Set-StrictMode -Version Latest; \
$ErrorActionPreference = 'Stop'; \
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')); \
choco config set commandExecutionTimeoutSeconds 14400; \
choco feature disable -n showDownloadProgress; \
choco feature enable -n allowGlobalConfirmation; \
choco install git --yes --no-progress --limit-output; \
New-Item -ItemType Directory -Path C:\gitea-runner -Force | Out-Null; \
$runnerUrl = 'https://gitea.com/gitea/runner/releases/download/v{0}/gitea-runner-{0}-windows-amd64.exe' -f $env:ACT_RUNNER_VERSION; \
Invoke-WebRequest -UseBasicParsing -Uri $runnerUrl -OutFile C:\gitea-runner\act_runner.exe
COPY ["start-runner.ps1", "C:/gitea-runner/start-runner.ps1"]
ENV PATH="C:\ProgramData\chocolatey\bin;C:\Program Files\Git\cmd;C:\Program Files\Git\bin;C:\Program Files\Git\usr\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Users\ContainerAdministrator\AppData\Local\Microsoft\WindowsApps"
ENTRYPOINT ["C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe", "-NoProfile", "-ExecutionPolicy", "Bypass", "-File", "C:\\gitea-runner\\start-runner.ps1"]