Overview
When you run jobs on Blacksmith, all official GitHub and popular third-party cache actions transparently interact with our 4x faster, colocated cache, instead of GitHub’s backend. Zero code changes are required.Currently, the Rust
sccache
and the GitHub Actions cache option in the docker/build-push-action
are still redirected to GitHub’s backend. For 40x faster Docker builds, please use our Blacksmith Docker actions. For more information, refer to the Docker builds page.Basics
GitHub’s cache action stores artifacts in Azure Blob Storage. When your runner isn’t in the same availability zone, downloads are often slow and unreliable. Blacksmith fixes this by storing cache artifacts in the same datacenter as your runners. Our approach removes network latency and almost saturates the NIC. As a result, your downloads complete around 4x faster, with no code changes required.Branch Protected Caches
When using our colocated cache, each cache entry will be scoped to its branch or tag to ensure cache entries are only accessible to the appropriate workflow runs. This enhances the security of our cache offering by creating a logical boundary between cache artifacts. These access restrictions are consistent with GitHub’s implementation. If you would rather share cache artifacts across branches in a repository, you can toggle this featureoff
in the settings page of your Blacksmith dashboard.
Opt out
If you’d rather not use our cache for any reason, just let us know by opening a support ticket and we’ll disable it for you.Pricing
There is no additional cost for using our cache. For all other pricing, please visit our pricing page.FAQ
How much free storage do I get?
How much free storage do I get?
By default, we provide 25GB of free storage per repo per week, a substantial increase from GitHub’s 10GB to maximize your cache hits.
How can I increase the allowed cache size for my organization?
How can I increase the allowed cache size for my organization?
If you’d like us to increase the allowed cache size for your organization, contact us at
[email protected].
What is the eviction policy?
What is the eviction policy?
Like GitHub, our cache evicts the least recently used cache entries that were last accessed more than 7 days ago.
Didn't you support another actions cache?
Didn't you support another actions cache?
Yes. Actions cache V1 has been deprecated. Please move to the newest approach.This cache is a drop-in replacement for GitHub’s cache action. Blacksmith’s cache co-locates cache artifacts in the same datacenter park as the bare metal instances running our VMs,
and can almost saturate the NIC on our runners. GitHub’s cache action stores cache artifacts in Azure Blob Storage,
which generally performs poorly when the action runner is not co-located in the same AZ as the storage. This results in ~4x faster cache download speeds compared to GitHub’s cache.Migrating from the If you’re using Please refer to the If the container image does not have Without these steps, you will see a
The following content describes the legacy approach of using
Blacksmith-specific cache actions. This approach is now deprecated in favor of
our new cache described above. Our new cache requires no code
changes and automatically works with GitHub’s native cache actions.The forks will no longer be updated by Blacksmith, so we recommend migrating workflows to the
upstream version of the action.
actions/cache
to the Blacksmith cache is a one line change. Simply replace the actions/cache@v3
line in your workflow files with useblacksmith/cache@v5
.actions/cache/save
and actions/cache/restore
, you can migrate them to useblacksmith/cache/save
and useblacksmith/cache/restore
respectively.For more information, refer to GitHub’s official documentation, since the Blacksmith cache is fully compatible with GitHub’s cache.Language specific cache actions
In addition to theuseblacksmith/cache
, the Blacksmith cache also provides drop-in replacements for GitHub’s official actions/setup-*
actions.
These replacements have the same semantics as the official setup actions, but they are backed by Blacksmith’s much faster and more reliable cache.README
of each setup action for detailed instructions on how to configure them.
For languages that we don’t have a setup action for, you can still leverage the useblacksmith/cache
action to cache dependencies by following these guidelines.Some languages have popular cache actions that are not maintained by GitHub. The Blacksmith cache offers drop-in replacements for these actions too so that you can leverage our faster cache.The Blacksmith cache offers a drop-in replacement for
Swatinem/rust-cache@v2
. Once you make the changes outlined below, you can configure the action using these guidelines.Other popular cache actions
As our customers migrate to Blacksmith, we keep growing our list of cache actions that are compatible with Blacksmith’s cache.Using the Blacksmith cache inside a container
If your GitHub Actions job runs inside a container, you will need to ensure that the container is hydrated with certain Blacksmith specific environment variables. These environment variables allow the container to upload and download artifacts from Blacksmith’s cache.To do this, you can add anenv
section to your container definition as shown below.tar
installed, you will need to install it as a step inside the container. tar
is required to extract
the artifacts downloaded from Blacksmith’s cache.401
error or an Unauthenticated
error when restoring or saving to the Blacksmith cache.