Add windows container build
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
name: Build Mumble Web 2 release builder containers
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
windows-release-builder-container-build:
|
||||
runs-on: windows
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
#- name: Set up Docker Buildx
|
||||
# uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Log in to container registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.CI_REGISTRY_USER }}
|
||||
password: ${{ secrets.CI_REGISTRY_PASSWORD }}
|
||||
|
||||
- name: Build and Push Docker image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: ./docker/windows-release-builder.Dockerfile
|
||||
push: true
|
||||
tags: git.ohea.xyz/mumble/mumble-web2-windows-release-builder:latest
|
||||
platforms: windows/amd64
|
||||
@@ -0,0 +1,34 @@
|
||||
FROM mcr.microsoft.com/windows/servercore:ltsc2022
|
||||
|
||||
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"]
|
||||
|
||||
# Download and install Visual Studio Build Tools 2022 with C++ and CMake
|
||||
RUN Invoke-WebRequest -UseBasicParsing "https://aka.ms/vs/17/release/vs_buildtools.exe" -OutFile "C:\\TEMP\\vs_buildtools.exe" ; \
|
||||
Start-Process "C:\\TEMP\\vs_buildtools.exe" -Wait -ArgumentList '--quiet', \
|
||||
'--wait', \
|
||||
'--norestart', \
|
||||
'--nocache', \
|
||||
'--add', 'Microsoft.VisualStudio.Workload.VCTools', \
|
||||
'--add', 'Microsoft.VisualStudio.Component.VC.CMake.Project', \
|
||||
'--add', 'Microsoft.VisualStudio.Component.Windows10SDK.19041', \
|
||||
'--includeRecommended', \
|
||||
'--installPath', 'C:\\BuildTools'
|
||||
|
||||
# Install Rust using the installer
|
||||
RUN Invoke-WebRequest -Uri "https://win.rustup.rs" -OutFile "rustup-init.exe" ; \
|
||||
Start-Process "rustup-init.exe" -Wait -ArgumentList '-y'; \
|
||||
Remove-Item "rustup-init.exe"
|
||||
|
||||
# Add Rust to PATH
|
||||
RUN setx PATH "$Env:USERPROFILE\\.cargo\\bin;$Env:PATH"
|
||||
|
||||
RUN $cmakeMsi = 'C:\\TEMP\\cmake-3.21.10-windows-x86_64.msi'; \
|
||||
Invoke-WebRequest -UseBasicParsing ` \
|
||||
-Uri "https://github.com/Kitware/CMake/releases/download/v3.21.10/cmake-3.21.10-windows-x86_64.msi" ` \
|
||||
-OutFile $cmakeMsi; \
|
||||
Start-Process msiexec.exe -Wait -ArgumentList "/i `"$cmakeMsi`" ADD_CMAKE_TO_PATH=System /qn"; \
|
||||
Remove-Item $cmakeMsi
|
||||
|
||||
# Setup environment
|
||||
CMD ["cmd.exe"]
|
||||
|
||||
Reference in New Issue
Block a user