Skip to content

Commit

Permalink
Speed up saving image
Browse files Browse the repository at this point in the history
Using `pigz` cuts the compression time from about 4 minutes to 2 minutes
in the default 4 core GitHub Actions runner.

The `upload-artifact` action also compresses with `zlib` which is
redundant, so let's disable this to speed up the upload step.
  • Loading branch information
StevenMaude committed May 15, 2024
1 parent e49c93e commit 89e7851
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,15 @@ jobs:

- name: Save docker image
run: |
docker save research-template | gzip > /tmp/research-template.tar.gz
docker save research-template | pigz > /tmp/research-template.tar.gz
- name: Upload docker image
uses: actions/upload-artifact@v4
with:
name: research-template-image
path: /tmp/research-template.tar.gz
# Disable compression; the file is already compressed
compression-level: 0

publish:
needs: [build-and-test]
Expand Down

0 comments on commit 89e7851

Please sign in to comment.