Compress images to improve download/upload speed (#1932)

This commit is contained in:
Ayaz Salikhov
2023-07-03 17:24:11 +04:00
committed by GitHub
parent c44f6e9476
commit 2df2eeca93
2 changed files with 3 additions and 6 deletions

View File

@@ -21,9 +21,6 @@ runs:
path: /tmp/jupyter/images/
- name: Load downloaded image to docker 📥
run: |
docker load --input /tmp/jupyter/images/${{ inputs.image }}-${{ inputs.platform }}.tar
zstd --uncompress --stdout --rm /tmp/jupyter/images/${{ inputs.image }}-${{ inputs.platform }}.tar.zst | docker load
docker image ls --all
shell: bash
- name: Delete the file 🗑️
run: rm /tmp/jupyter/images/${{ inputs.image }}-${{ inputs.platform }}.tar
shell: bash

View File

@@ -96,11 +96,11 @@ jobs:
- name: Save image as a tar for later use 💾
run: |
mkdir -p /tmp/jupyter/images/
docker save ${{ env.OWNER }}/${{ inputs.image }} -o /tmp/jupyter/images/${{ inputs.image }}-${{ inputs.platform }}.tar
docker save ${{ env.OWNER }}/${{ inputs.image }} | zstd > /tmp/jupyter/images/${{ inputs.image }}-${{ inputs.platform }}.tar.zst
shell: bash
- name: Upload image as artifact 💾
uses: actions/upload-artifact@v3
with:
name: ${{ inputs.image }}-${{ inputs.platform }}
path: /tmp/jupyter/images/${{ inputs.image }}-${{ inputs.platform }}.tar
path: /tmp/jupyter/images/${{ inputs.image }}-${{ inputs.platform }}.tar.zst
retention-days: 3