Skip to content

Commit

Permalink
feat(模块): 添加action
Browse files Browse the repository at this point in the history
  • Loading branch information
leochen-g committed Mar 11, 2022
1 parent 6844184 commit 501fe57
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
name: Docker Image 1.x CI
name: Docker Image CI

on:
push:
branches:
- 1.x
branches: [ipad]
# 每次 push tag 时进行构建,不需要每次 push 都构建。使用通配符匹配每次 tag 的提交,记得 tag 名一定要以 v 开头
tags:
- v*
env:
# 设置 docker 镜像名
IMAGE_NAME: aibotk/wechat-assistant-1x
IMAGE_NAME: aibotk/wechat-assistant-ipad

jobs:

Expand All @@ -29,6 +28,6 @@ jobs:
- name: Push the tagged Docker image
run: docker push $IMAGE_NAME:${{steps.vars.outputs.tag}}
- name: Build the latest Docker image
run: docker build . --file Dockerfile --tag $IMAGE_NAME:latest
run: docker build . --file Dockerfile.ipad --tag $IMAGE_NAME:latest
- name: Push the latest Docker image
run: docker push $IMAGE_NAME:latest
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM wechaty/wechaty:0.68
FROM wechaty/wechaty:next

RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN echo 'Asia/Shanghai' >/etc/timezone
Expand Down
17 changes: 17 additions & 0 deletions Dockerfile.ipad
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM wechaty/wechaty:0.68

RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN echo 'Asia/Shanghai' >/etc/timezone
ARG NODE_ENV
ENV NODE_ENV $NODE_ENV

WORKDIR /bot

COPY package.json .
RUN jq 'del(.dependencies.wechaty)' package.json | sponge package.json \
&& npm install \
&& sudo rm -fr /tmp/* ~/.npm \
COPY . .

CMD [ "npm", "start" ]

5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

由于UOS桌面版协议微信已经关闭了,没法再继续用桌面版协议登录了,现在只能换回web协议了。可以登录网页版微信的账号可以继续用,不能登录网页版协议的就不能用了。或者你可以申请Wechaty 的ipad local协议的token可以免费试用7天 。申请地址: https://github.com/padlocal/wechaty-puppet-padlocal

## 智能微秘书-插件版
## 智能微秘书-插件版-ipad协议版

让你闲置的微信号成为你的日常小秘书(没有闲置的也没关系,添加我的小助手微信号,她就能成为你的智能微秘书)。

Expand Down Expand Up @@ -137,8 +137,7 @@ node 版本 14.17.6 ,不要太高,太高安装依赖会有问题

#### Step 1: 安装

克隆本项目,并进入项目根目录执行 `npm install`安装项目依赖(
如果安装比较慢,可以使用` npm i --canvas_binary_host_mirror=https://npm.taobao.org/mirrors/node-canvas-prebuilt/`)
克隆本项目,并进入项目根目录执行 `npm install`安装项目依赖

#### Step 2: 配置

Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
"wechaty": "^0.68.1",
"wechaty-puppet": "^0.41.1",
"wechaty-puppet-padlocal": "^0.4.2",
"wechaty-puppet-wechat": "0.27.0",
"wechaty-web-panel": "^0.2.17"
"wechaty-web-panel": "^1.0.3-beta.0"
},
"devDependencies": {
"pm2": "^4.2.3"
Expand Down

0 comments on commit 501fe57

Please sign in to comment.