From 56a58a0c4227b31eb190c27ffca11a5c76d0c22f Mon Sep 17 00:00:00 2001 From: liushuyu Date: Mon, 26 Feb 2024 22:35:21 -0700 Subject: [PATCH] CI: merge digest caches --- .github/workflows/ci.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8ec512c..b9fe9e6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,11 +52,13 @@ jobs: run: | mkdir -p /tmp/digests digest="${{ steps.build.outputs.digest }}" + cache_name="digests-${{ matrix.platform }}" + echo "CACHE_NAME=${cache_name/\//-}" >> $GITHUB_ENV touch "/tmp/digests/${digest#sha256:}" - name: Upload digest uses: actions/upload-artifact@v4 with: - name: digests + name: ${{ env.CACHE_NAME }} path: /tmp/digests/* if-no-files-found: error retention-days: 1 @@ -69,8 +71,9 @@ jobs: - name: Download digests uses: actions/download-artifact@v4 with: - name: digests + pattern: digests-* path: /tmp/digests + merge-multiple: true - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Create Docker Image Label