Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Docker image and CI workflow configurations #1405

Merged
merged 2 commits into from
Feb 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/quickstart-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Windows Quickstart
on:
workflow_dispatch:
push:
branches: ['browser-version-dev', 'master', 'dev', 'refactoring-v3-mvp']
branches: ['master']
tags: ['**']
pull_request:
branches: ['master', 'dev', 'refactoring-v3-mvp']
branches: ['master']

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
name: Run Tests

on:
workflow_dispatch:
push:
branches:
- refactoring-v3-mvp
- '**'
pull_request:
branches:
- refactoring-v3-mvp
- master

jobs:
test:
Expand Down
11 changes: 3 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,15 @@ COPY ./data/fonts/sarasa-mono-sc-regular.ttf /usr/share/fonts/
# 安装系统依赖
RUN apt-get -yqq update && \
apt-get -yqq install --no-install-recommends \
xvfb \
qtbase5-dev \
wkhtmltopdf \
ffmpeg \
dbus \
curl \
jq \
unzip && \
(strip --remove-section=.note.ABI-tag /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 || true) && \
apt-get -yq clean && \
apt-get -yq purge --auto-remove -o APT::AutoRemove::RecommendsImportant=false && \
rm -rf /var/lib/apt/lists/*

# 配置dbus
RUN export DBUS_SESSION_BUS_ADDRESS=`dbus-daemon --fork --config-file=/usr/share/dbus-1/session.conf --print-address`

# 创建应用目录
WORKDIR /app

Expand All @@ -42,8 +35,10 @@ COPY --from=builder /build/dist/*.whl /app/
# 下载Web UI并安装依赖
RUN LATEST_RELEASE_URL=$(curl -s https://api.github.com/repos/DarkSkyTeam/chatgpt-for-bot-webui/releases | jq -r '.[0].assets[] | select(.name == "dist.zip") | .browser_download_url') \
&& curl -L -o dist.zip "$LATEST_RELEASE_URL" \
&& unzip dist.zip -d web \
&& unzip dist.zip -d /tmp/web_dist \
&& rm dist.zip && \
mkdir -p /app/web && \
mv /tmp/web_dist/dist/* /app/web && \
pip install --no-cache-dir *.whl && \
pip cache purge && \
python -c "from pycloudflared import try_cloudflare; try_cloudflare(-1)" || true && \
Expand Down