Description
The cache can grow very quickly with large images, since old entries are not deleted.
Configuration
[...]
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
[...]
- name: Build
uses: docker/build-push-action@v2
with:
push: false
tags: ${{ steps.prepare.outputs.image }}
platforms: ${{ env.DOCKER_PLATFORMS }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
context: .
[...]
Logs
logs_37.zip
My solution
Add a clean-cache configuration option that runs the following command before exporting the layers docker system prune -f --filter "until=5h".
Description
The cache can grow very quickly with large images, since old entries are not deleted.
Configuration
Logs
logs_37.zip
My solution
Add a
clean-cacheconfiguration option that runs the following command before exporting the layersdocker system prune -f --filter "until=5h".