buildx: cache binary to hosted tool cache and GHA cache backend#129
buildx: cache binary to hosted tool cache and GHA cache backend#129crazy-max merged 3 commits intodocker:mainfrom
Conversation
be4c881 to
639229c
Compare
1e227a2 to
6915a77
Compare
nicks
left a comment
There was a problem hiding this comment.
i like this approach! i tested it and it works for me - https://github.com/docker/gondolier/actions/runs/5476236490/jobs/9973479123?pr=381
i'm still having problems getting buildx to build from a tag though, see this failure: https://github.com/docker/gondolier/actions/runs/5476109857/jobs/9973172585?pr=381. The only way i was able to get it to work was to manually resolve the tag to a SHA.
I need to take a closer look at this one. Have you tried with |
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
6915a77 to
c1edd0b
Compare
|
oh forgot to mention - i confirmed that |


When installing buildx, downloaded binary is not cached. As public GitHub runners are ephemeral, this can take some time to download the binary for each workflow execution: https://github.com/docker/setup-buildx-action/actions/runs/5462992694/jobs/9943119048#step:3:1
And even more if building from source: https://github.com/docker/setup-buildx-action/actions/runs/5462992694/jobs/9943110665#step:3:1
With these changes, binary will be cached to the hosted tool cache like the official actions do today with node, go, ...
This is fine for self-hosted runners but not public runners as hosted tool cache is pruned when a job is completed. To solve this issue, we also cache the binary to the GitHub Actions Cache backend.