setup-qemu-action
setup-qemu-action copied to clipboard
cache-image input to enable/disable caching of binfmt image
follow-up https://github.com/docker/actions-toolkit/pull/200 related to https://github.com/docker/setup-qemu-action/issues/110
Tested through ci workflow
first run
setup-qemu-action saves image to hosted tool cache: https://github.com/docker/setup-qemu-action/actions/runs/9775565828/job/26986231861#step:3:113
And post cache to upload to GitHub Cache store: https://github.com/docker/setup-qemu-action/actions/runs/9775565828/job/26986231861#step:7:3
second run
download image from cache and load it: https://github.com/docker/setup-qemu-action/actions/runs/9775565828/job/26986391188#step:3:105
See cache entries as well: https://github.com/docker/setup-qemu-action/actions/caches
How does this cache get invalidated?
when image is downloaded from cache it first loads it to docker store: https://github.com/docker/setup-qemu-action/actions/runs/9775565828/job/26986391188#step:3:110
and to make sure it's up to date we are doing a new docker pull: https://github.com/docker/setup-qemu-action/actions/runs/9775565828/job/26986391188#step:3:113
if image is up to date then we got https://github.com/docker/setup-qemu-action/actions/runs/9775565828/job/26986391188#step:3:116
Status: Image is up to date for tonistiigi/binfmt:master
Otherwise hosted tool cache is evicted and new image is saved in place.
More info on actions-toolkit repo: https://github.com/docker/actions-toolkit/blob/c70efab546578fc88fb6528cd28de42705cda4be/src/docker/docker.ts#L108