16 lines
573B

  1. #!/bin/bash
  2. # fetch latest release tag
  3. CHATGPT_ON_WECHAT_TAG=`curl -sL "https://api.github.com/repos/zhayujie/chatgpt-on-wechat/releases/latest" | \
  4. grep '"tag_name":' | \
  5. sed -E 's/.*"([^"]+)".*/\1/'`
  6. # build image
  7. docker build -f Dockerfile.alpine \
  8. --build-arg CHATGPT_ON_WECHAT_VER=$CHATGPT_ON_WECHAT_TAG \
  9. -t zhayujie/chatgpt-on-wechat .
  10. # tag image
  11. docker tag zhayujie/chatgpt-on-wechat zhayujie/chatgpt-on-wechat:alpine
  12. docker tag zhayujie/chatgpt-on-wechat zhayujie/chatgpt-on-wechat:$CHATGPT_ON_WECHAT_TAG-alpine