Setup Actions
Drop-in replacements for popular setup-* GitHub Actions that use WarpBuild Cache for toolchain and dependency caching
WarpBuild maintains forks of the popular setup-* GitHub Actions that are drop-in replacements for their upstream counterparts. They accept the same inputs and produce the same outputs, but bundle the WarpBuild cache client so that toolchain and package-manager caching is served by WarpBuild Cache instead of GitHub Actions Cache.
To adopt one, replace the upstream action reference with the matching WarpBuilds/* action. No other workflow changes are required.
These actions automatically use WarpBuild Cache when run on WarpBuild runners. No extra configuration is required.
Supported actions
| Action | Replaces | What it caches |
|---|---|---|
WarpBuilds/setup-node | actions/setup-node | npm, yarn, and pnpm dependencies |
WarpBuilds/setup-python | actions/setup-python | pip, pipenv, and poetry dependencies |
WarpBuilds/setup-go | actions/setup-go | Go modules and build outputs |
WarpBuilds/setup-java | actions/setup-java | Maven, Gradle, and sbt dependencies |
WarpBuilds/setup-dotnet | actions/setup-dotnet | NuGet global packages |
WarpBuilds/setup-ruby | ruby/setup-ruby | Installed gems via bundle install |
WarpBuilds/setup-zig | goto-bus-stop/setup-zig | Downloaded Zig compilers |
WarpBuilds/rust-cache | Swatinem/rust-cache | Cargo registry, git deps, and target dir |
WarpBuilds/gradle-actions | gradle/actions | Gradle User Home (wrappers, deps, caches) |
WarpBuilds/mise-action | jdx/mise-action | Tools installed by mise |
Node.js
WarpBuilds/setup-node installs Node.js and caches npm, yarn, or pnpm dependencies via the cache input. From v6, npm caching is enabled automatically when the packageManager or devEngines.packageManager field in package.json is set to npm.
- uses: WarpBuilds/setup-node@v6
with:
node-version: 20
cache: npmKey cache inputs:
cache- Package manager to cache for:npm,yarn, orpnpm.cache-dependency-path- Path to the lockfile(s) used for the cache key. Supports wildcards and multiple paths.package-manager-cache- Set tofalseto disable the automatic npm caching. Default:true
Python
WarpBuilds/setup-python installs Python or PyPy and caches pip, pipenv, or poetry dependencies. Caching is off by default; enable it with the cache input.
- uses: WarpBuilds/setup-python@v6
with:
python-version: '3.12'
cache: pipKey cache inputs:
cache- Package manager to cache for:pip,pipenv, orpoetry.cache-dependency-path- Path to the dependency file(s) used for the cache key (e.g.requirements.txt,poetry.lock).
Go
WarpBuilds/setup-go installs Go and caches Go modules and build outputs. Caching is on by default, keyed on the hash of go.mod.
- uses: WarpBuilds/setup-go@v6
with:
go-version: '1.22'
cache: trueKey cache inputs:
cache- Set tofalseto disable caching. Default:truecache-dependency-path- Path to the dependency file(s) used for the cache key, e.g.**/go.sumor multiplego.sumfiles in a monorepo.
Java
WarpBuilds/setup-java installs a JDK and caches dependencies for Maven, Gradle, or sbt. Caching is off by default; enable it with the cache input.
- uses: WarpBuilds/setup-java@v5
with:
distribution: temurin
java-version: '21'
cache: mavenKey cache inputs:
cache- Package manager to cache for:maven,gradle, orsbt.cache-dependency-path- Path to the build file(s) used for the cache key (e.g.pom.xml,build.gradle). Useful for monorepos.
For advanced Gradle caching (build outputs, configuration cache, read-only caches), use WarpBuilds/gradle-actions instead.
.NET
WarpBuilds/setup-dotnet installs the .NET SDK and caches the NuGet global-packages folder. Caching is off by default and requires a NuGet lock file (packages.lock.json).
- uses: WarpBuilds/setup-dotnet@v4
with:
dotnet-version: '8.0'
cache: true
cache-dependency-path: '**/packages.lock.json'Key cache inputs:
cache- Set totrueto enable NuGet package caching. Default:falsecache-dependency-path- Path to the lock file(s) when they are not in the repository root.
Ruby
WarpBuilds/setup-ruby installs Ruby and, with bundler-cache: true, runs bundle install and caches the installed gems automatically. Any separate bundle install step can be removed.
- uses: WarpBuilds/[email protected]
with:
ruby-version: '3.3'
bundler-cache: trueKey cache inputs:
bundler-cache- Runsbundle installand caches installed gems. Default:falsecache-version- Arbitrary string to bust the gem cache when needed.
Zig
WarpBuilds/setup-zig installs the Zig compiler and caches the downloaded compiler archives by default.
- uses: WarpBuilds/setup-zig@v2
with:
version: 0.13.0Key cache inputs:
cache- Set tofalseto disable compiler caching. Default:true
Rust
WarpBuilds/rust-cache implements smart caching for Rust/Cargo projects with sensible defaults, caching the Cargo registry, git dependencies, and workspace target directories. Install your toolchain before this action runs, as the rustc version is part of the cache key. Set cache-provider: warpbuild to store the cache in WarpBuild Cache.
- run: rustup toolchain install stable --profile minimal
- uses: WarpBuilds/rust-cache@v2
with:
cache-provider: warpbuildKey cache inputs:
cache-provider- Cache backend to use. Set towarpbuildfor WarpBuild Cache. Default:githubshared-key- Stable cache key shared across multiple jobs, instead of the automatic per-job key.workspaces- Newline-separated$workspace -> $targetentries for non-standard workspace layouts.cache-directories- Additional non-workspace directories to cache.cache-on-failure- Save the cache even when the workflow fails. Default:falsecache-all-crates- Cache all crates, including CI tooling crates. Default:falsesave-if- Condition controlling whether the cache is saved, e.g.${{ github.ref == 'refs/heads/main' }}.
Gradle
WarpBuilds/gradle-actions is a fork of gradle/actions with WarpBuild Cache integration. Its setup-gradle action configures Gradle and caches the Gradle User Home, including wrapper distributions, downloaded dependencies, and build caches.
- uses: WarpBuilds/setup-java@v5
with:
distribution: temurin
java-version: '21'
- uses: WarpBuilds/gradle-actions/setup-gradle@v5
- run: ./gradlew buildKey cache inputs:
cache-disabled- Set totrueto disable caching. Default:falsecache-read-only- Restore existing cache entries without writing new ones, e.g. on non-default branches.cache-write-only- Write cache entries without restoring, useful for seeding a cache.gradle-home-cache-includes/gradle-home-cache-excludes- Fine-grained control over which Gradle User Home paths are cached.
See the setup-gradle documentation for the full input reference.
mise
WarpBuilds/mise-action is a fork of jdx/mise-action that installs the mise tool manager, runs mise install for the tools defined in your .tool-versions or mise.toml, and caches the installed tools in WarpBuild Cache.
- uses: WarpBuilds/mise-action@v2
with:
version: 2024.10.0
cache: trueKey cache inputs:
cache- Cache the mise tool installations. Default:true
Version pinning
Each action is tagged with the same major versions as its upstream, so an existing pin like actions/setup-node@v6 maps directly to WarpBuilds/setup-node@v6. Check each repository's releases page for the latest tags.
Last updated on