amulya-labs/OpenCache Action

Fast, configurable drop-in replacement for actions/cache with pluggable backends (local disk, S3-compatible, GCS).

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
keyAn explicit key for restoring and saving the cacheyes
pathA list of files, directories, and wildcard patterns to cache and restoreyes
restore-keysAn ordered list of keys to use for restoring stale cache if no cache hit occurred for key. Note `cache-hit` returns false in this case.no
fail-on-cache-missFail the workflow if cache entry is not foundnofalse
lookup-onlyCheck if a cache entry exists for the given input(s) without downloading the cachenofalse
save-alwaysRun the post step to save the cache even if another step before failsnofalse
storage-providerStorage backend: local, s3, gcsnolocal
cache-pathBase path for local cache storage. Default: $XDG_CACHE_HOME/gha-opencache or $HOME/.cache/gha-opencache (Linux), ~/Library/Caches/gha-opencache (macOS), %LOCALAPPDATA%\gha-opencache (Windows). Override with OPENCACHE_PATH env var.no
s3-bucketS3 bucket name (required for s3 provider)no
s3-regionS3 regionnous-east-1
s3-endpointCustom S3 endpoint (for MinIO, R2, DigitalOcean Spaces, etc.)no
s3-prefixKey prefix within bucketnogha-cache/
s3-force-path-styleUse path-style URLs (required for MinIO)nofalse
gcs-bucketGCS bucket name (required for gcs provider)no
gcs-projectGCP project ID (optional, uses default from credentials)no
gcs-prefixKey prefix within bucketnogha-cache/
gcs-key-filePath to service account key JSON fileno
compressionCompression algorithm: auto, zstd, gzip, or nonenoauto
compression-levelCompression level (1-19 for zstd, 1-9 for gzip). Uses optimal defaults if not specified.no
ttl-daysDays until cache entries expire (0 = no expiration)no7
max-cache-size-gbMaximum cache size in GB per repository (0 = unlimited). Uses LRU eviction when exceeded.no10
namedescription
cache-hitA boolean value to indicate an exact match was found for the primary key
cache-primary-keyThe primary key that was used
cache-matched-keyThe key of the cache that was restored, if any