diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index f292f5c9..c3418c67 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -21,9 +21,18 @@ jobs: install_runtime: true cache: true destination: ${{ github.workspace }}/vulkan-sdt + + - name: Setup .NET Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.x' + + - name: Publish with dotnet + run: | + dotnet publish -c Release -r win10-x64 -o ./publish --self-contained true - name: Build Docker image - run: docker build -t lods --build-arg VULKAN_DLL_PATH=./vulkan-sdt/1.3.268.0/runtime/x64/vulkan-1.dll . + run: docker build -t lods --build-arg EXECUTABLE=./DCL_PiXYZ.exe --build-arg VULKAN_DLL_PATH=./vulkan-sdt/1.3.268.0/runtime/x64/vulkan-1.dll . - name: Execute test case | tmp run: | diff --git a/Dockerfile b/Dockerfile index 2faaf254..fc4bdeb4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -78,29 +78,11 @@ RUN powershell -Command \ RUN setx /M PATH "%PATH%;C:\Node\node-v18.0.0-win-x64" -# RUN powershell -Command Invoke-WebRequest -OutFile dotnet-runtime-installer.exe -Uri https://download.visualstudio.microsoft.com/download/pr/6744eb9d-dcd4-4386-9d87-b03b70fc58ce/818fadf3f3d919c17ba845b2195bfd9b/dotnet-hosting-3.1.32-win.exe; \ -# Start-Process -Wait -FilePath .\dotnet-runtime-installer.exe -ArgumentList '/install /quiet'; \ -# Remove-Item dotnet-runtime-installer.exe -Force - -# ENV PATH="C:\Program Files\dotnet:${PATH}" - WORKDIR /app/api -COPY --from=dotnet-build /app/api/publish/ . -COPY build-lods.ps1 . -# RUN regsvr32 /s "C:\app\api\PiXYZAPI.dll" - -RUN curl -SL --output vs_buildtools.exe https://aka.ms/vs/16/release/vs_buildtools.exe && \ - start /wait vs_buildtools.exe --quiet --wait --norestart --nocache \ - --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --includeOptional --quiet --norestart \ - --installPath C:\BuildTools && \ - del vs_buildtools.exe - -RUN FOR /R "C:\BuildTools\VC\Tools\MSVC" %i IN (dumpbin.exe) DO setx /M PATH "%~dpi;%PATH%" - -RUN dumpbin /dependents ./PiXYZAPI.dll - -# Set environment variables for Visual Studio -# ENV PATH="C:\BuildTools\Common7\Tools\;C:\BuildTools\VC\Tools\MSVC\14.29.16\bin\Hostx64\x64;${PATH}" +# COPY --from=dotnet-build /app/api/publish/ . +# COPY build-lods.ps1 . +ARG EXECUTABLE +COPY ${EXECUTABLE} ./DCL_PiXYZ.exe RUN dir