The Blacksmith cache is a drop-in replacement for GitHub’s cache action. Migrating from the 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.

    name: Cache Cargo dependencies
-    uses: actions/cache@v3
+    uses: useblacksmith/cache@v5
    with:
      path: |
        ~/.cargo/registry
        ~/.cargo/git
        target
      key: ${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock') }}
      restore-keys: |
        ${{ runner.labels }}-rust-${{ matrix.rust }}-

If you’re using 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 the official documentation, since the Blacksmith cache is fully compatible with GitHub’s cache.

Language specific cache actions

In addition to the useblacksmith/cache, Blacksmith also provides drop-in replacements for GitHub’s offical 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.

Please refer to the 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. Blacksmith offers drop-in replacements for these actions too so that you can leverage our superior cache.

Blacksmith offers a drop-in replacement for the popular Swatinem/rust-cache@v2. Once you make the changes outlined below you can configure the action using these guidelines.

Swatinem/rust-cache@v2
        name: Setup rust cache
-       uses: Swatinem/rust-cache@v2
+       uses: useblacksmith/rust-cache@v3

As our customers migrate to Blacksmith, we keep growing our list of cache actions that are compatible with Blacksmith’s cache.

golangci/golangci-lint-action@v6
        name: Run lint
-       uses: golangci/golangci-lint-action@v6
+       uses: useblacksmith/golangci-lint-action@v6