Skip to content

Commit 2df2eec

Browse files
authored
Compress images to improve download/upload speed (#1932)
1 parent c44f6e9 commit 2df2eec

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

.github/actions/load-image/action.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ runs:
2121
path: /tmp/jupyter/images/
2222
- name: Load downloaded image to docker 📥
2323
run: |
24-
docker load --input /tmp/jupyter/images/${{ inputs.image }}-${{ inputs.platform }}.tar
24+
zstd --uncompress --stdout --rm /tmp/jupyter/images/${{ inputs.image }}-${{ inputs.platform }}.tar.zst | docker load
2525
docker image ls --all
2626
shell: bash
27-
- name: Delete the file 🗑️
28-
run: rm /tmp/jupyter/images/${{ inputs.image }}-${{ inputs.platform }}.tar
29-
shell: bash

.github/workflows/docker-build-test-upload.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,11 @@ jobs:
9696
- name: Save image as a tar for later use 💾
9797
run: |
9898
mkdir -p /tmp/jupyter/images/
99-
docker save ${{ env.OWNER }}/${{ inputs.image }} -o /tmp/jupyter/images/${{ inputs.image }}-${{ inputs.platform }}.tar
99+
docker save ${{ env.OWNER }}/${{ inputs.image }} | zstd > /tmp/jupyter/images/${{ inputs.image }}-${{ inputs.platform }}.tar.zst
100100
shell: bash
101101
- name: Upload image as artifact 💾
102102
uses: actions/upload-artifact@v3
103103
with:
104104
name: ${{ inputs.image }}-${{ inputs.platform }}
105-
path: /tmp/jupyter/images/${{ inputs.image }}-${{ inputs.platform }}.tar
105+
path: /tmp/jupyter/images/${{ inputs.image }}-${{ inputs.platform }}.tar.zst
106106
retention-days: 3

0 commit comments

Comments
 (0)