From 14fe96ca426d2195f8aad52e09a6b0361ef55879 Mon Sep 17 00:00:00 2001 From: Ed Davey Date: Tue, 24 Sep 2024 16:57:01 +0100 Subject: [PATCH] X - replace broken Docker caching with a Github Action --- .github/workflows/continuous-integration.yml | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 9984bd0a..7efe0ed1 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -18,26 +18,13 @@ jobs: - name: Check out code uses: actions/checkout@v4 - - id: cache-docker - uses: actions/cache@v3 + - name: Cache Docker images. + uses: ScribeMD/docker-cache@0.5.0 with: - path: /tmp/docker-save - key: - docker-save-${{ hashFiles('Dockerfile', 'Gemfile.lock', - 'package-lock.json') }} - - - if: steps.cache-docker.outputs.cache-hit == 'true' - name: Load cached Docker image - run: docker load -i /tmp/docker-save/snapshot.tar || true + key: docker-${{ runner.os }}-${{ hashFiles('docker-compose.ci.yml') }} - name: Build run: script/ci/cibuild - name: Test run: script/ci/test - - - if: always() && steps.cache-docker.outputs.cache-hit != 'true' - name: Prepare Docker cache - run: - mkdir -p /tmp/docker-save && docker save app_test:latest -o - /tmp/docker-save/snapshot.tar && ls -lh /tmp/docker-save