Quickstart
Try Blacksmith runners in under 5 minutes
1. Install the Blacksmith GitHub app
Start by going to the app.blacksmith.sh and follow the prompts to install Blacksmith’s GitHub app. This grants Blacksmith the necessary permissions to execute your GitHub Action jobs on Blacksmith’s infrastructure.
2. Ensure Blacksmith runners have the correct permissions
For Blacksmith to be able to run GitHub Actions in your repository, you must ensure that the runners have the correct permissions. To do this, navigate to your Organization settings and click into
Actions
-> Runner groups
-> Default
to make sure that the repository is selected.
Allow public repositories
box under Repository access
.3. Switching to Blacksmith runners in your workflow files
GitHub Action workflows are found in .github/workflows
, where the runs-on
property specifies the runner tag.
To switch to a Blacksmith runner, simply replace the current runner tag with the appropriate Blacksmith runner tag. Blacksmith is a drop-in replacement for GitHub runners, so no other changes are required.
For a comprehensive list of available Blacksmith runners, refer to our runners configuration page.
To switch from the default ubuntu-latest
runner to a Blacksmith runner with 2 vCPUs, modify your workflow as shown:
Blacksmith runners are available in 2, 4, 8, 16 and 32 vCPU configurations.
runs-on
fields to utilize Blacksmith runners.4. Use Blacksmith’s Cache to speed up jobs (recommended)
Blacksmith’s caching solution useblacksmith/cache
can significantly reduce job times by co-locating your cache artifacts with your Blacksmith runners.
While the default GitHub cache actions/cache@v3
operates at speeds up to 100MB/s, our useblacksmith/cache
dramatically increases this to over 400MB/s.
To learn more about how we achieve this, checkout our Blacksmith cache page.
useblacksmith/cache
is a drop-in replacement for actions/cache
and offers 25GB of free storage per repository each week, a substantial increase from GitHub’s 10GB.
Switching is straightforward - replace the GitHub cache action in your workflow file with Blacksmith cache:
5. Make Docker builds incremental on Blacksmith runners (Optional)
Blacksmith supports incremental Docker builds with a one-line code change. This feature allows Docker builds in your GitHub Action workflows to reuse cached layers from previous runs, and only rebuild the layers that have changed.
To enable incremental Docker builds with Blacksmith runners, all you need to do is change the following line in your GitHub Actions workflow file:
Read more about incremental Docker builds here.