CI: merge digest caches

This commit is contained in:
liushuyu 2024-02-26 22:35:21 -07:00
parent 7535f22b8f
commit 56a58a0c42
No known key found for this signature in database
GPG Key ID: 23D1CE4534419437
1 changed files with 5 additions and 2 deletions

View File

@ -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