优化actions执行逻辑

This commit is contained in:
李寻欢 2024-02-29 09:40:29 +08:00
parent 86b6005da6
commit f8d854fe28
4 changed files with 146 additions and 29 deletions

52
.github/workflows/build-image-msyh.yaml vendored Normal file
View File

@ -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

View File

@ -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

View File

@ -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

35
Dockerfile-msyh Normal file
View File

@ -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"]