Cache multiple folders with snapshot caching
Currently (v2.9.2), we can only snapshot â a single folder.
To workaround this, we can simply change the default folders of one of the tools we want to cache. For example with docker and runner caches:
- uses: runs-on/action@v2
- uses: runs-on/snapshot@v1 with: path: /home/runner/.cache
- name: Trick to backup /var/lib/docker as well in the same volume run: | echo '{"data-root": "/home/runner/.cache/docker-data"}' | sudo tee /etc/docker/daemon.json > /dev/null sudo systemctl restart dockerMost of the tools support updating their caching folder, the logic is quite simple.
Last updated: October 22, 2025