Merge branch 'master' of github.com:Devsh-Graphics-Programming/docker… #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: NanoServer MSVC | |
on: [push, workflow_dispatch] | |
jobs: | |
run-nanoserver-msvc-winsdk-x64-build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Setup Developer Command Prompt | |
uses: ilammy/msvc-dev-cmd@release/v1 | |
with: | |
arch: x64 | |
sdk: 10.0.22621.0 | |
- name: Build Dockerfile (default build-args) | |
shell: pwsh | |
run: | | |
docker build -t nanoserver-msvc-winsdk . | |
- name: Run container | |
shell: pwsh | |
run: | | |
function Remove-Trailing-Backslash($path) { | |
return $path -replace '\\$', '' | |
} | |
$repoWorkspace = Remove-Trailing-Backslash("${{ github.workspace }}") | |
$vctoolsPath = Remove-Trailing-Backslash($env:VCToolsInstallDir) | |
$windowsSdkPath = Remove-Trailing-Backslash($env:WindowsSdkDir) | |
Write-Host "Source Path: $repoWorkspace" | |
Write-Host "MSVC Path: $vctoolsPath" | |
Write-Host "Windows SDK Path: $windowsSdkPath" | |
docker run --rm -dit --name orphan ` | |
-v "$repoWorkspace:C:\mount\source" ` | |
-v "$vctoolsPath:C:\mount\msvc" ` | |
-v "$windowsSdkPath:C:\mount\windowssdk" ` | |
nanoserver-msvc-winsdk cmd |