ci: fix Dockerfile & ci
This commit is contained in:
parent
aa03c89133
commit
83f95935de
13
.github/workflows/linux-release.yml
vendored
13
.github/workflows/linux-release.yml
vendored
@ -7,6 +7,11 @@ on:
|
|||||||
tags:
|
tags:
|
||||||
- '*'
|
- '*'
|
||||||
- '!*-alpha*'
|
- '!*-alpha*'
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
name:
|
||||||
|
description: 'reason'
|
||||||
|
required: false
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -22,10 +27,10 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
CI: ""
|
CI: ""
|
||||||
run: |
|
run: |
|
||||||
cd web/default
|
cd web
|
||||||
npm install
|
git describe --tags > VERSION
|
||||||
REACT_APP_VERSION=$(git describe --tags) npm run build
|
REACT_APP_VERSION=$(git describe --tags) chmod u+x ./build.sh && ./build.sh
|
||||||
cd ../..
|
cd ..
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v3
|
uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
|
13
.github/workflows/macos-release.yml
vendored
13
.github/workflows/macos-release.yml
vendored
@ -7,6 +7,11 @@ on:
|
|||||||
tags:
|
tags:
|
||||||
- '*'
|
- '*'
|
||||||
- '!*-alpha*'
|
- '!*-alpha*'
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
name:
|
||||||
|
description: 'reason'
|
||||||
|
required: false
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
@ -22,10 +27,10 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
CI: ""
|
CI: ""
|
||||||
run: |
|
run: |
|
||||||
cd web/default
|
cd web
|
||||||
npm install
|
git describe --tags > VERSION
|
||||||
REACT_APP_VERSION=$(git describe --tags) npm run build
|
REACT_APP_VERSION=$(git describe --tags) chmod u+x ./build.sh && ./build.sh
|
||||||
cd ../..
|
cd ..
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v3
|
uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
|
5
.github/workflows/windows-release.yml
vendored
5
.github/workflows/windows-release.yml
vendored
@ -7,6 +7,11 @@ on:
|
|||||||
tags:
|
tags:
|
||||||
- '*'
|
- '*'
|
||||||
- '!*-alpha*'
|
- '!*-alpha*'
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
name:
|
||||||
|
description: 'reason'
|
||||||
|
required: false
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
11
Dockerfile
11
Dockerfile
@ -3,16 +3,7 @@ FROM node:16 as builder
|
|||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
COPY ./web .
|
COPY ./web .
|
||||||
COPY ./VERSION .
|
COPY ./VERSION .
|
||||||
RUN themes=$(cat THEMES) \
|
RUN chmod u+x ./build.sh && ./build.sh
|
||||||
&& IFS=$'\n' \
|
|
||||||
&& for theme in $themes; do \
|
|
||||||
theme_path="web/$theme" \
|
|
||||||
&& echo "Building theme: $theme" \
|
|
||||||
&& cd $theme_path \
|
|
||||||
&& npm install \
|
|
||||||
&& DISABLE_ESLINT_PLUGIN='true' REACT_APP_VERSION=$(cat VERSION) npm run build \
|
|
||||||
&& cd /app \
|
|
||||||
done
|
|
||||||
|
|
||||||
FROM golang AS builder2
|
FROM golang AS builder2
|
||||||
|
|
||||||
|
@ -99,6 +99,7 @@ _✨ 通过标准的 OpenAI API 格式访问所有的大模型,开箱即用
|
|||||||
+ 邮箱登录注册(支持注册邮箱白名单)以及通过邮箱进行密码重置。
|
+ 邮箱登录注册(支持注册邮箱白名单)以及通过邮箱进行密码重置。
|
||||||
+ [GitHub 开放授权](https://github.com/settings/applications/new)。
|
+ [GitHub 开放授权](https://github.com/settings/applications/new)。
|
||||||
+ 微信公众号授权(需要额外部署 [WeChat Server](https://github.com/songquanpeng/wechat-server))。
|
+ 微信公众号授权(需要额外部署 [WeChat Server](https://github.com/songquanpeng/wechat-server))。
|
||||||
|
23. 支持主题切换,设置环境变量 `THEME` 即可,默认为 `default`,欢迎 PR 更多主题,具体参考[此处](./web/README.md)。
|
||||||
|
|
||||||
## 部署
|
## 部署
|
||||||
### 基于 Docker 进行部署
|
### 基于 Docker 进行部署
|
||||||
|
13
web/build.sh
Normal file
13
web/build.sh
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
version=$(cat VERSION)
|
||||||
|
themes=$(cat THEMES)
|
||||||
|
IFS=$'\n'
|
||||||
|
|
||||||
|
for theme in $themes; do
|
||||||
|
echo "Building theme: $theme"
|
||||||
|
cd $theme
|
||||||
|
npm install
|
||||||
|
DISABLE_ESLINT_PLUGIN='true' REACT_APP_VERSION=$version npm run build
|
||||||
|
cd ..
|
||||||
|
done
|
Loading…
Reference in New Issue
Block a user