From 2b66333ed3615f1d8d2b7f134d40e644bafecef2 Mon Sep 17 00:00:00 2001 From: x-tools-author Date: Fri, 25 Apr 2025 22:53:26 +0800 Subject: [PATCH] chore: update the file --- ...uild-docker.yml => build-docker-linux.yml} | 2 +- .github/workflows/build-docker-windows.yml | 47 +++++++++++++++++++ docker/win-ltsc2022/Dockerfile | 3 ++ 3 files changed, 51 insertions(+), 1 deletion(-) rename .github/workflows/{build-docker.yml => build-docker-linux.yml} (98%) create mode 100644 .github/workflows/build-docker-windows.yml create mode 100644 docker/win-ltsc2022/Dockerfile diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker-linux.yml similarity index 98% rename from .github/workflows/build-docker.yml rename to .github/workflows/build-docker-linux.yml index 297f8a80..27f404d4 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker-linux.yml @@ -1,4 +1,4 @@ -name: build-docker +name: build-docker(linux) on: workflow_dispatch: # Enables manually diff --git a/.github/workflows/build-docker-windows.yml b/.github/workflows/build-docker-windows.yml new file mode 100644 index 00000000..c86ca09c --- /dev/null +++ b/.github/workflows/build-docker-windows.yml @@ -0,0 +1,47 @@ +name: build-docker(windows) +on: + workflow_dispatch: # Enables manually + +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + +jobs: + build: + name: Build + runs-on: ubuntu-22.04 + env: + CR_PAT: ${{ secrets.CR_PAT }} + QT_MODULES: 'qtcharts qtserialbus qtserialport qtwebsockets' + QT_VERSION: 6.8.3 + steps: + - name: Pull respository + uses: actions/checkout@v4 + # - name: Install Qt(android) + # uses: jurplel/install-qt-action@v4 + # with: + # aqtversion: '==3.1.*' + # target: android + # arch: android_armv7 + # host: linux + # dir: ${{ github.workspace }} + # modules: ${{env.QT_MODULES}} + # version: ${{ env.QT_VERSION }} + # - name: Install Qt(linux_gcc_64) + # uses: jurplel/install-qt-action@v4 + # with: + # aqtversion: '==3.1.*' + # target: desktop + # arch: linux_gcc_64 + # host: linux + # dir: ${{ github.workspace }} + # modules: ${{env.QT_MODULES}} + # version: ${{ env.QT_VERSION }} + - name: Build docker image + run: | #https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md + docker build -t x-tools-windows:amd64 . -f docker/win-ltsc2022/Dockerfile + - name: Push docker image to github registry + run: | + echo ${{ env.CR_PAT }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin + docker rmi ghcr.io/x-tools-author/x-tools-windows:amd64 || true + docker tag x-tools-windows:amd64 ghcr.io/x-tools-author/x-tools-windows:amd64 + docker push ghcr.io/x-tools-author/x-tools-windows:amd64 \ No newline at end of file diff --git a/docker/win-ltsc2022/Dockerfile b/docker/win-ltsc2022/Dockerfile new file mode 100644 index 00000000..29c97145 --- /dev/null +++ b/docker/win-ltsc2022/Dockerfile @@ -0,0 +1,3 @@ +FROM mcr.microsoft.com/windows/nanoserver:ltsc2022 + +# Install CMake 3.30.8 to C:\Tools\CMake \ No newline at end of file