atmos ci cache save
Archive the cache root (the toolchain and anything else under it) and upload it under the cache key. Cache entries are write-once: when the exact key was an exact hit at restore time (content unchanged) or has already been saved this lifecycle, the save is skipped.
Runs only inside a CI runner
save transfers cache content through the CI provider's runtime cache API, which requires credentials that exist only inside a runner (on GitHub Actions: ACTIONS_RUNTIME_TOKEN and ACTIONS_RESULTS_URL). Run outside a runner it reports that the cache is unavailable. To manage the cache from your workstation, use list and delete.
Configure the CI Cache
Configure the cache key and paths used by this command in your atmos.yaml.
Usage
atmos ci cache save [flags]
Examples
# Save using the configured (or default) key
atmos ci cache save
# Save under an explicit key
atmos ci cache save --key="toolchain-linux-amd64-abc123"
# Save only specific root-relative subpaths
atmos ci cache save --path=toolchain
Flags
--key/-k- Exact cache key to save under. Defaults to a key derived from the toolchain lockfile plus OS/arch.
--path/-p- Root-relative subpaths to save. Defaults to the entire cache root. Repeatable.
--root- Override the cache root directory (defaults to the Atmos XDG cache directory, e.g.
~/.cache/atmos).
Environment Variables
ATMOS_CI_CACHE_ENABLED- Must be
true(orci.cache.enabled: trueinatmos.yaml) for the command to run. ATMOS_CI_CACHE_KEY- Overrides
--key. ACTIONS_RUNTIME_TOKEN/ACTIONS_RESULTS_URL- Provided automatically inside a GitHub Actions runner; required for the GitHub Actions cache backend.
Related
atmos ci cache restore- Restore the cache- CI Cache Configuration - Configure the cache