block/Gradle Cache

Save and restore Gradle build caches using bundle-cache. Restores a cache bundle before the build and automatically saves it afterward. Uses the GitHub Actions cache by default — no S3 setup required.

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
cache-keyCache key identifying the bundle (e.g. "assembleDebug"). Defaults to the job name so each job gets its own cache automatically. no${{ github.job }}
bucketS3 bucket name. When set, uses S3 instead of the GitHub Actions cache. no
regionAWS region for the S3 bucket.nous-west-2
key-prefixOptional path prefix prepended to all S3 object keys. Useful for namespacing objects within a shared bucket. no
refGit ref used to search for a base bundle. On pull_request restores, the tool walks history from the merge-base of this ref and HEAD. Defaults to the repository's default branch. no
branchBranch name for delta cache support. On pull_request events this is auto-detected from GITHUB_HEAD_REF, so you typically don't need to set it. When active, restore applies a branch delta concurrently with the base bundle, and save-delta runs in the post step instead of a full save. On pushes to the default branch, a full bundle is saved automatically. no
project-dirPath to the Gradle project root. Used for the git history walk and as the working directory for save/restore. Defaults to the repository root. no.
gradle-user-homePath to GRADLE_USER_HOME.no~/.gradle
included-buildComma-separated list of included build paths to archive (e.g. "buildSrc,build-logic"). Defaults to buildSrc. no
saveWhether to save the cache after the build. Set to "false" to skip.notrue
versionVersion of gradle-cache to install (e.g. "v0.3.0"). Defaults to latest. no
log-levelLog level: debug, info, warn, or error.noinfo
github-tokenGitHub token used for cache management (e.g. deleting stale delta entries). Defaults to the automatic GITHUB_TOKEN. no${{ github.token }}

no outputs