From f8d854fe286f77ae4cba1d8f9a1fc67bd2cb6380 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=AF=BB=E6=AC=A2?= Date: Thu, 29 Feb 2024 09:40:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96actions=E6=89=A7=E8=A1=8C?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-image-msyh.yaml | 52 ++++++++++++++++++++++++ .github/workflows/build-image-novnc.yaml | 52 ++++++++++++++++++++++++ .github/workflows/build-image.yaml | 36 ++++------------ Dockerfile-msyh | 35 ++++++++++++++++ 4 files changed, 146 insertions(+), 29 deletions(-) create mode 100644 .github/workflows/build-image-msyh.yaml create mode 100644 .github/workflows/build-image-novnc.yaml create mode 100644 Dockerfile-msyh diff --git a/.github/workflows/build-image-msyh.yaml b/.github/workflows/build-image-msyh.yaml new file mode 100644 index 0000000..50ad104 --- /dev/null +++ b/.github/workflows/build-image-msyh.yaml @@ -0,0 +1,52 @@ +name: BuildImage + +on: + push: + branches: + - main + paths: + - ".github/workflows/build-image-msyh.yaml" + - "Dockerfile-msyh" + - "install-wechat.sh" + - "cmd.sh" + +jobs: + build-image: + runs-on: ubuntu-latest + container: + # 使用这个镜像,不然Docker无法打包镜像 + image: catthehacker/ubuntu:act-latest + + steps: + - name: Login to Repository + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build 3.9.8.25 version with msyh + uses: docker/build-push-action@v2 + with: + push: true + tags: lxh01/wxhelper-docker:3.9.8.25-v2-msyh + file: Dockerfile-msyh + build-args: | + WECHAT_URL=https://github.com/tom-snow/wechat-windows-versions/releases/download/v3.9.8.25/WeChatSetup-3.9.8.25.exe + WXHELPER_URL=https://github.com/ttttupup/wxhelper/releases/download/3.9.8.25-v2/wxhelper.dll + + - name: Build 3.9.5.81 version with msyh + uses: docker/build-push-action@v2 + with: + push: true + tags: lxh01/wxhelper-docker:3.9.5.81-v11-msyh + file: Dockerfile-msyh + + - name: Build 3.9.2.23 version with msyh + uses: docker/build-push-action@v2 + with: + push: true + tags: lxh01/wxhelper-docker:3.9.2.23-v9-msyh + file: Dockerfile-msyh + build-args: | + WECHAT_URL=https://github.com/tom-snow/wechat-windows-versions/releases/download/v3.9.2.23/WeChatSetup-3.9.2.23.exe + WXHELPER_URL=https://github.com/ttttupup/wxhelper/releases/download/3.9.2.23-v9/wxhelper.dll diff --git a/.github/workflows/build-image-novnc.yaml b/.github/workflows/build-image-novnc.yaml new file mode 100644 index 0000000..da06a4c --- /dev/null +++ b/.github/workflows/build-image-novnc.yaml @@ -0,0 +1,52 @@ +name: BuildImage + +on: + push: + branches: + - main + paths: + - ".github/workflows/build-image-novnc.yaml" + - "Dockerfile-novnc" + - "install-wechat.sh" + - "cmd.sh" + +jobs: + build-image: + runs-on: ubuntu-latest + container: + # 使用这个镜像,不然Docker无法打包镜像 + image: catthehacker/ubuntu:act-latest + + steps: + - name: Login to Repository + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build 3.9.8.25 version with noVNC + uses: docker/build-push-action@v2 + with: + push: true + tags: lxh01/wxhelper-docker:3.9.8.25-v2-novnc + file: Dockerfile-novnc + build-args: | + WECHAT_URL=https://github.com/tom-snow/wechat-windows-versions/releases/download/v3.9.8.25/WeChatSetup-3.9.8.25.exe + WXHELPER_URL=https://github.com/ttttupup/wxhelper/releases/download/3.9.8.25-v2/wxhelper.dll + + - name: Build 3.9.5.81 version with noVNC + uses: docker/build-push-action@v2 + with: + push: true + tags: lxh01/wxhelper-docker:3.9.5.81-v11-novnc + file: Dockerfile-novnc + + - name: Build 3.9.2.23 version with noVNC + uses: docker/build-push-action@v2 + with: + push: true + tags: lxh01/wxhelper-docker:3.9.2.23-v9-novnc + file: Dockerfile-novnc + build-args: | + WECHAT_URL=https://github.com/tom-snow/wechat-windows-versions/releases/download/v3.9.2.23/WeChatSetup-3.9.2.23.exe + WXHELPER_URL=https://github.com/ttttupup/wxhelper/releases/download/3.9.2.23-v9/wxhelper.dll diff --git a/.github/workflows/build-image.yaml b/.github/workflows/build-image.yaml index 84a657c..584f38a 100644 --- a/.github/workflows/build-image.yaml +++ b/.github/workflows/build-image.yaml @@ -4,6 +4,11 @@ on: push: branches: - main + paths: + - ".github/workflows/build-image.yaml" + - "Dockerfile" + - "install-wechat.sh" + - "cmd.sh" jobs: build-image: @@ -27,30 +32,13 @@ jobs: build-args: | WECHAT_URL=https://github.com/tom-snow/wechat-windows-versions/releases/download/v3.9.8.25/WeChatSetup-3.9.8.25.exe WXHELPER_URL=https://github.com/ttttupup/wxhelper/releases/download/3.9.8.25-v2/wxhelper.dll - - - name: Build 3.9.8.25 version with noVNC - uses: docker/build-push-action@v2 - with: - push: true - tags: lxh01/wxhelper-docker:3.9.8.25-v2-novnc - file: Dockerfile-novnc - build-args: | - WECHAT_URL=https://github.com/tom-snow/wechat-windows-versions/releases/download/v3.9.8.25/WeChatSetup-3.9.8.25.exe - WXHELPER_URL=https://github.com/ttttupup/wxhelper/releases/download/3.9.8.25-v2/wxhelper.dll - + - name: Build 3.9.5.81 version uses: docker/build-push-action@v2 with: push: true tags: lxh01/wxhelper-docker:3.9.5.81-v11 - - - name: Build 3.9.5.81 version with noVNC - uses: docker/build-push-action@v2 - with: - push: true - tags: lxh01/wxhelper-docker:3.9.5.81-v11-novnc - file: Dockerfile-novnc - + - name: Build 3.9.2.23 version uses: docker/build-push-action@v2 with: @@ -59,13 +47,3 @@ jobs: build-args: | WECHAT_URL=https://github.com/tom-snow/wechat-windows-versions/releases/download/v3.9.2.23/WeChatSetup-3.9.2.23.exe WXHELPER_URL=https://github.com/ttttupup/wxhelper/releases/download/3.9.2.23-v9/wxhelper.dll - - - name: Build 3.9.2.23 version with noVNC - uses: docker/build-push-action@v2 - with: - push: true - tags: lxh01/wxhelper-docker:3.9.2.23-v9-novnc - file: Dockerfile-novnc - build-args: | - WECHAT_URL=https://github.com/tom-snow/wechat-windows-versions/releases/download/v3.9.2.23/WeChatSetup-3.9.2.23.exe - WXHELPER_URL=https://github.com/ttttupup/wxhelper/releases/download/3.9.2.23-v9/wxhelper.dll diff --git a/Dockerfile-msyh b/Dockerfile-msyh new file mode 100644 index 0000000..e3e560b --- /dev/null +++ b/Dockerfile-msyh @@ -0,0 +1,35 @@ +FROM lxh01/wine-vnc:msyh + +# 清理环境 +RUN sudo rm -rf /tmp/.X0-lock + +ENV WINEDEBUG=fixme-all + +# 根据传入参数安装微信和wxhelper.dll +ARG WECHAT_URL=https://github.com/tom-snow/wechat-windows-versions/releases/download/v3.9.5.81/WeChatSetup-3.9.5.81.exe +ARG WXHELPER_URL=https://github.com/ttttupup/wxhelper/releases/download/3.9.5.81-v11/wxhelper.dll + +WORKDIR /home/app/.wine/drive_c + +# 加载注入器 +ADD https://github.com/furacas/DllInjector/releases/download/v1.4.0/DllInjector64.exe DllInjector.exe +RUN sudo chown app:app DllInjector.exe && sudo chmod a+x DllInjector.exe + +# 下载微信 +ADD ${WECHAT_URL} WeChatSetup.exe +RUN sudo chown app:app WeChatSetup.exe && sudo chmod a+x WeChatSetup.exe + +# 下载wxhelper.dll +ADD ${WXHELPER_URL} wxhelper.dll +RUN sudo chown app:app wxhelper.dll + +# 安装微信 +COPY install-wechat.sh install-wechat.sh +RUN sudo chmod a+x install-wechat.sh && ./install-wechat.sh +RUN rm -rf WeChatSetup.exe && rm -rf install-wechat.sh + +EXPOSE 5900 19088 + +COPY cmd.sh /cmd.sh +RUN sudo chmod +x /cmd.sh +CMD ["/cmd.sh"] \ No newline at end of file