From 3ebec3f11053e78189b1bfe8b7b5b5601182c894 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B6=B5=E6=9B=A6?= Date: Wed, 14 Jan 2026 19:25:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=95=9C=E5=83=8F=E7=BC=96?= =?UTF-8?q?=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e5f6125..841e481 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,6 +55,8 @@ jobs: push: false load: true tags: ${{ env.VERSION_TAG }} + cache-from: type=gha,scope=${{ matrix.platform }} + cache-to: type=gha,mode=max,scope=${{ matrix.platform }} - name: Test Docker image for ${{ matrix.platform }} run: | @@ -99,15 +101,6 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Download ${{ matrix.platform }} image - uses: actions/download-artifact@v4 - with: - name: docker-images-${{ matrix.platform }} - - - name: Load ${{ matrix.platform }} image - run: | - docker load -i xiaomusic-${{ github.ref_name }}-${{ matrix.platform }}.tar - - name: Publish to Docker Hub (${{ matrix.platform }}) if: github.ref_name == 'main' uses: docker/build-push-action@v6 @@ -116,6 +109,7 @@ jobs: context: . push: true tags: ${{ env.VERSION_TAG }} + cache-from: type=gha,scope=${{ matrix.platform }} - name: Publish to Docker Hub latest and stable (${{ matrix.platform }}) if: startsWith(github.ref, 'refs/tags/v') @@ -128,6 +122,7 @@ jobs: ${{ env.VERSION_TAG }} ${{ env.LATEST_TAG }} ${{ env.STABLE_TAG }} + cache-from: type=gha,scope=${{ matrix.platform }} # 推送镜像到 GitHub Release publish-release: @@ -177,6 +172,7 @@ jobs: echo "type upload ${FILE}" gh release upload "${RELEASE_NAME}" "${FILE}" --clobber done + # 推送 PyPI 包 publish-pypi: runs-on: ubuntu-latest