You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Is it possible to share cache between github hosted and self-hosted runners? #1755
Found it, we should install zstd to keep consistent with ubuntu-latest
We can find some evidence in the source code (tag=v4) that the compression method is decisive for the final cache result, with zstl being the preferred choice, followed by gzip. For different runners, if one has zstl installed (ubuntu-latest) while another does not (fallback to the gzip method), then the final cache versions they produce will be different. This also explains why a cache generated on a self-hosted runner cannot be used on ubuntu-latest (even if their keys are exactly the same).
Activity
Potabk commentedon May 10, 2026
Found it, we should install zstd to keep consistent with
ubuntu-latestWe can find some evidence in the source code (tag=v4) that the compression method is decisive for the final cache result, with zstl being the preferred choice, followed by gzip. For different runners, if one has zstl installed (ubuntu-latest) while another does not (fallback to the gzip method), then the final cache versions they produce will be different. This also explains why a cache generated on a self-hosted runner cannot be used on ubuntu-latest (even if their keys are exactly the same).
paths + "zstd-without-long" + salt→ SHA256paths + "gzip" + salt→ SHA256