From 02c75b405d128180dfa2dbc55958298fbe15fda7 Mon Sep 17 00:00:00 2001 From: Peter Van Dyken Date: Thu, 18 Apr 2024 08:32:21 -0400 Subject: [PATCH] Change docker caching method --- .../actions/build-test-container/action.yaml | 21 +++++++------------ 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/.github/actions/build-test-container/action.yaml b/.github/actions/build-test-container/action.yaml index 1301d4c7..670f3710 100644 --- a/.github/actions/build-test-container/action.yaml +++ b/.github/actions/build-test-container/action.yaml @@ -20,28 +20,21 @@ runs: - name: Cache Template Testing Containers uses: actions/cache@v4 with: - path: | - var-cache-apt - var-lib-apt + path: /tmp/.buildx-cache key: ${{ runner.os }}-test-template-cache-${{ hashFiles('containers/test-template/**') }}-${{ inputs.python-version }} - - name: Inject container-test-template-cache into docker - uses: reproducible-containers/buildkit-cache-dance@v3.0.0 - with: - cache-map: | - { - "var-cache-apt": "/var/cache/apt", - "var-lib-apt": "/var/lib/apt" - } - skip-extraction: ${{ steps.cache.outputs.cache-hit }} - name: Build Docker container for cache uses: docker/build-push-action@v5 with: context: containers/test-template - cache-from: type=gha - cache-to: type=gha,mode=max + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new,mod=max push: false load: ${{ inputs.load == 'true' }} tags: snakebids/test-template:${{ inputs.python-version }} platforms: linux/amd64 build-args: | PYTHON_VERSION=${{ inputs.python-version }} + - name: Move cache + run: | + rm -rf /tmp/.buildx-cache + mv /tmp/.buildx-cache-new /tmp/.buildx-cache