From 89e78514ff1933eb9b6bc8621b694e056f266267 Mon Sep 17 00:00:00 2001 From: Steven Maude Date: Fri, 3 May 2024 17:28:38 +0100 Subject: [PATCH] Speed up saving image 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. --- .github/workflows/main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9dda7ab..11a3f7d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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]