Getting started

Run your first workflow

#

1. Give Buildjet Access to your GitHub repository

To start, grant BuildJet access to your GitHub account here. BuildJet operates as a GitHub OAuth application, allowing us to provide you with access to BuildJet's infrastructure.

If you lack administrative rights to the repository, reach out to your account owner and request them to install BuildJet for GitHub Actions. Simply forward them the link provided.

#

2. Add BuildJet to your workflow.yml

In order for BuildJet for GitHub Actions to be used by your workflow job, you need to specify a runner tag in the jobs.[job-name].runs-on property.

We recommend starting with the 4 vCPU runner, as this has the same cost as the GitHub runner and serves as a good baseline for comparison.

yaml
1
name: Test Suite
2
on: push
3
jobs:
4
test:
-
runs-on: ubuntu-latest
+
runs-on: buildjet-4vcpu-ubuntu-2204
7
name: Test
8
steps:
9
- uses: actions/checkout@v2

You can view the full list of runners here.

#

3. Use the fast, free & reliable BuildJet cache (Optional)

Unfortunately, the GitHub Actions cache tends to be unreliable and slow for large caches. BuildJet provides a reliable, fast and free alternative that significantly speeds up your workflow runs.

Installation is straightforward; simply replace actions/cache with buildjet/cache in your workflow file.

yaml
1
#...
-
- uses: actions/cache@v3
+
- uses: buildjet/cache@v3
4
with:
5
path: ~/.npm
6
id: npm-cache
7
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
8
restore-keys: |
9
${{ runner.os }}-node-
10
11
- name: Download dependencies
12
if: steps.npm-cache.outputs.cache-hit != 'true'
13
run: npm ci
14
#...

All properties that works on GitHubs Cache Action will work on BuildJet's cache action, it's just the underlying storage that is different.

We also provide drop-in replacement for most popular setup actions. For example, if you're using actions/setup-node you can replace it with buildjet/setup-node and it will work exactly the same, it's just the underlying storage that is different. Head over to the setup actions page to see the full list of supported actions.

#

Next steps

Congratulations! That is all you need to do to get up and running with BuildJet for GitHub Actions. Now you can try to out different BuildJet hardware configurations and see how much they improve the job.

Most jobs don't need an 32vCPU machine, but a 4vCPU would be enough. You should play around and see what works best for your setup. It's recommend to read about how pick to right runner.

Please keep in mind that every account starts with only being able to run 64 AMD vCPU's at the same time/concurrently. If you would like to increase the number of concurrent runs you can make, head over to the pricing page for more details