diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 16efbf0..f43a62f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -118,3 +118,19 @@ jobs: tags: | ${{ secrets.DOCKERHUB_USERNAME }}/novel-crawl:latest ${{ secrets.DOCKERHUB_USERNAME }}/novel-crawl:${{ github.ref_name }} + + # 解压 SQL 文件 + - name: Unzip MySQL SQL File + run: | + unzip -o ./doc/sql/novel_plus_data.sql.zip -d ./doc/sql/ + + # 构建并推送 mysql-novel-plus 镜像 + - name: Build and Push mysql-novel-plus Docker Image + uses: docker/build-push-action@v5 + with: + context: ./doc/sql + file: ./doc/sql/Dockerfile + push: true + tags: | + 201206030/mysql-novel-plus:latest + 201206030/mysql-novel-plus:${{ github.ref_name }} \ No newline at end of file diff --git a/doc/sql/Dockerfile b/doc/sql/Dockerfile index 47a4b8c..fddb124 100644 --- a/doc/sql/Dockerfile +++ b/doc/sql/Dockerfile @@ -1,2 +1,2 @@ FROM mysql:8.0 -COPY novel_plus.sql /docker-entrypoint-initdb.d/init.sql +COPY novel_plus_data.sql /docker-entrypoint-initdb.d/init.sql