From 979686d707de26beb290807af9a65fe1eb75eb18 Mon Sep 17 00:00:00 2001 From: infinitycat Date: Wed, 19 Nov 2025 19:54:15 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=20Dockerfile?= =?UTF-8?q?=EF=BC=8C=E6=B7=BB=E5=8A=A0=20git=20=E5=AE=89=E8=A3=85=E6=AD=A5?= =?UTF-8?q?=E9=AA=A4=E4=BB=A5=E6=94=AF=E6=8C=81=E6=8F=92=E4=BB=B6=E5=AE=89?= =?UTF-8?q?=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/docker-image.yml | 5 ++++- Dockerfile | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index fb514291..989888b2 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -1,11 +1,12 @@ name: Docker Build and Push on: + schedule: + - cron: '0 0 * * *' push: branches: - main - classical - - dev tags: - "v*.*.*" - "v*" @@ -24,6 +25,7 @@ jobs: - name: Check out git repository uses: actions/checkout@v4 with: + ref: ${{ github.event_name == 'schedule' && 'dev' || github.ref }} fetch-depth: 0 # Clone required dependencies @@ -77,6 +79,7 @@ jobs: - name: Check out git repository uses: actions/checkout@v4 with: + ref: ${{ github.event_name == 'schedule' && 'dev' || github.ref }} fetch-depth: 0 # Clone required dependencies diff --git a/Dockerfile b/Dockerfile index b0f3775f..b6a9cd1b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,6 +25,8 @@ WORKDIR /MaiMBot # 复制依赖列表 COPY requirements.txt . +RUN apt-get update && apt-get install -y git + # 从编译阶段复制 LPMM 编译结果 COPY --from=lpmm-builder /usr/local/lib/python3.13/site-packages/ /usr/local/lib/python3.13/site-packages/