Skip to content

Commit

Permalink
优化actions执行逻辑
Browse files Browse the repository at this point in the history
  • Loading branch information
lixh00 committed Feb 29, 2024
1 parent 86b6005 commit f8d854f
Show file tree
Hide file tree
Showing 4 changed files with 146 additions and 29 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/build-image-msyh.yaml
Original file line number Diff line number Diff line change
@@ -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
52 changes: 52 additions & 0 deletions .github/workflows/build-image-novnc.yaml
Original file line number Diff line number Diff line change
@@ -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
36 changes: 7 additions & 29 deletions .github/workflows/build-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ on:
push:
branches:
- main
paths:
- ".github/workflows/build-image.yaml"
- "Dockerfile"
- "install-wechat.sh"
- "cmd.sh"

jobs:
build-image:
Expand All @@ -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:
Expand All @@ -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 changes: 35 additions & 0 deletions Dockerfile-msyh
Original file line number Diff line number Diff line change
@@ -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"]

0 comments on commit f8d854f

Please sign in to comment.