1
0
Fork 0

CI: merge digest caches

This commit is contained in:
liushuyu 2024-02-26 21:49:55 -07:00
parent b9b1603ba1
commit a30626957b
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: | run: |
mkdir -p /tmp/digests mkdir -p /tmp/digests
digest="${{ steps.build.outputs.digest }}" digest="${{ steps.build.outputs.digest }}"
cache_name="${{ matrix.platform }}"
echo "CACHE_NAME=${cache_name/\//-}" >> $GITHUB_ENV
touch "/tmp/digests/${digest#sha256:}" touch "/tmp/digests/${digest#sha256:}"
- name: Upload digest - name: Upload digest
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: digests name: ${{ env.CACHE_NAME }}
path: /tmp/digests/* path: /tmp/digests/*
if-no-files-found: error if-no-files-found: error
retention-days: 1 retention-days: 1
@ -69,8 +71,9 @@ jobs:
- name: Download digests - name: Download digests
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
with: with:
name: digests pattern: digests-*
path: /tmp/digests path: /tmp/digests
merge-multiple: true
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: Create Docker Image Label - name: Create Docker Image Label