From 3af45a19880b8dd246d1595d652073b515f97616 Mon Sep 17 00:00:00 2001 From: Rob Cowsill <42620235+rcowsill@users.noreply.github.com> Date: Tue, 8 Dec 2020 12:27:25 +0000 Subject: [PATCH] Fix docker layer caching in build workflow * Only cache docker layers on Linux * Add target OS name to cache key (futureproofing) --- .github/workflows/build.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 62849181..562ea0cd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,6 +16,10 @@ jobs: - name: Cache Docker layers uses: satackey/action-docker-layer-caching@v0.0.8 + with: + key: docker-layers-linux-{hash} + restore-keys: | + docker-layers-linux- # Ignore the failure of a step and avoid terminating the job. continue-on-error: true @@ -38,11 +42,6 @@ jobs: - name: Checkout uses: actions/checkout@v2 - - name: Cache Docker layers - uses: satackey/action-docker-layer-caching@v0.0.8 - # Ignore the failure of a step and avoid terminating the job. - continue-on-error: true - - name: Build Docker builder image run: docker build --build-arg UID=$(id -u) --build-arg GID=$(id -g) -f .github/docker/windows/Dockerfile -t builder .