Buildless + GitHub Actions

Using Buildless to accelerate CI on GitHub

You can now use Buildless inside your Github Actions CI using the buildless/setup action. The action will install the CLI tools and Agent by default. You can choose to start the agent or keep it stopped until you need it for your build.


Firstly, add the buildless/setup action to your workflow:

  - name: "Setup: Buildless"
    uses: buildless/[email protected]
- name: "Setup: Buildless"
  uses: buildless/[email protected]
    version: latest
    os: linux
    arch: amd64
    agent: true
    apikey: ${{ env.BUILDLESS_APIKEY || secrets.BUILDLESS_APIKEY }}
    token: ${{ env.GITHUB_TOKEN }}
    export_path: true

Make sure to use the latest release

Optionally, you can set various configuration values. Here's a full example of the default configuration, which is effectively the same as above:


Remember to set your API key

The best way to set your API key is with a Repository Secret. Set BUILDLESS_APIKEY to your key and it should show up in your action as secrets.BUILDLESS_APIKEY.

Authorizing your Github Actions CI

Buildless in Github Actions is best used with Buildless Cloud. Otherwise, there's nowhere to store your persistent cache, and no ability to share your cache with your local machine.

Follow the instructions below to setup your API key for build caching with CI.


Your API key

If you're logged in, click here to see your API keys.

  1. Obtain a Buildless API key. All users, orgs, and projects have their own API key.

  2. Navigate to your Actions secrets. Within the repo you want to enable for caching, go to the Settings tab. In the left column, under the heading Security, click the Secrets and variables menu, then click Actions:

    Creating an Actions secret

    Creating an Actions secret

  3. Create a Repository Secret. Click the button to the right side, New repository secret, and fill in the name and key value:

    Create it as `BUILDLESS_APIKEY`

    Create it as BUILDLESS_APIKEY

  4. Map your secret as needed. Use your secret in your workflow. Buildless applications will automatically pick up your API key as long as it is set in your environment.
    For most workflow types, it's enough to map the secret and move on. It will surface in two ways:


The Buildless Setup action can be configured to start the agent when it starts up. You can specify a specific version to install, and there are several other configuration options available.

versionstringlatestVersion to install; defaults to latest
osstring(Current)OS to target; defaults to current platform
archstring(Current)Arch to target; defaults to current platform
agentbooleantrueInstall and start the Buildless Agent
apikeystring${{ env.BUILDLESS_APIKEY }}Explicitly set a Buildless API key
tokenstring${{ env.GITHUB_TOKEN }}GitHub token to use for fetching assets
export_pathbooleantrueWhether to install Buildless onto the PATH

Options for os (support varies)

  • darwin, mac, macos
  • windows, win32
  • linux

Options for arch (support varies)

  • amd64, x64, x86_64
  • arm64, aarch64

Supported Platforms

At this time, all runners on Github are supported, as are self-hosted runners, on any of the following platforms:

  • Darwin (amd64 or arm64)
  • Linux (amd64)
  • Windows (amd64)