ci: skip cache save on self-hosted runners - #2
Merged
Conversation
goastler
marked this pull request as ready for review
August 12, 2026 07:04
goastler
enabled auto-merge
August 12, 2026 07:23
goastler
force-pushed
the
ci/skip-cache-save-on-self-hosted
branch
from
August 12, 2026 07:25
0c84818 to
3a546ef
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
restore_npm_cacheandrestore_cargo_cachealready skip on self-hosted (runner.environment != 'self-hosted', opt back in via an input). The matchingsave_*actions had no such gate, so a self-hosted job still uploaded the whole cache over the WAN and then ran thegh cache deletecleanup.That asymmetry is worse than plain waste: the cleanup keeps only the newest
npm-<os>-<arch>-/cargo-…key, so a cache produced on self-hosted hardware displaces the ones GitHub-hosted runners restore from.Both actions now take
save-on-self-hosted(default"false"), matching the shape of the restore inputs.Related, not fixed here: the cached paths include
.turboand.nx, which live inside the workspace.actions/checkoutrunsgit clean -ffdxwhen reusing a checkout, so on a persistent runner those are wiped every job — skipping restore there means turbo starts cold every run. The fix is to relocate those cache dirs under$HOMErather than to re-enable the upload; tracked separately.