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