Buildkite can connect to your GitHub repository and use the Commit Status API to update the status of commits in Pull Requests.
To complete this integration, you will need admin privileges for your GitHub repository.
On this page:
Connecting Buildkite and GitHub
You can now use our GitHub App to connect a Buildkite organization to a GitHub organization, removing the reliance on individual user connections to report build statuses. See the changelog announcement.
If you want to connect using OAuth you can still do so from your Buildkite Personal Settings.
To connect your Buildkite account to GitHub using the GitHub App
Connecting Buildkite and GitHub using the GitHub App lets your GitHub organization Admins see permissions and manage access on a per-repository basis.
- Open your Buildkite organization's Settings and choose Repository Providers
- Click GitHub and select the GitHub organization you want to connect to your Buildkite organization
You'll be prompted to give the GitHub App permission to submit commit statuses to your organization's repositories. After that you can set up a pipeline.
To connect your Buildkite account to GitHub using OAuth
To connect your GitHub account open Buildkite’s Personal Settings, choose Connected Apps then click the GitHub Connect button:
You'll be prompted to give permission for Buildkite to post status updates, and then redirected back to your Connected Apps page. After that you can set up a pipeline.
Setting up a new pipeline for a GitHub repository
Create a new pipeline on Buildkite, using your GitHub repository URL in the form
Add at least one step to your pipeline, then click "Next". Change these steps at any time in Pipeline Settings.
Follow the instructions on the page to set up a webhook:
- Add a new webhook in GitHub.
- Paste in the provided webhook URL.
- Select which events trigger the webhook.
If you need to set up the webhook again, you can find the instructions linked at the bottom of the pipeline GitHub settings page.
Branch configuration and Settings
You can edit the GitHub settings for each pipeline from the pipeline’s settings page:
Running builds on Pull Requests
To run builds for GitHub Pull Requests, edit the GitHub settings for your Buildkite pipeline and choose the 'Build Pull Requests' checkbox.
- Choose the 'build pull requests' checkbox.
Optionally, select one or more of the following:
- limit pull request builds to certain branches.
- skip pull request builds for commits that have already been built.
- build pull requests that are ready for review.
- build pull requests for forked repositories. Make sure to check the managing secrets guide if you choose to do this.
If you want to run builds only on pull requests, set the Branch Filter Pattern in the pipeline to a branch name that will never occur (e.g. "this-branch-will-never-occur"). Pull request builds ignore the Branch Filter Pattern, and all pushes to other branches that don't match the pattern are ignored.
Noreply email handling
When you connect your GitHub account to Buildkite the email address associated with the GitHub account is added to your Buildkite account. If you've got GitHub set not to display your email,
[username]@users.noreply.github.com or the more recent
[username+id]@users.noreply.github.com is added instead. The email address of a commit is one of the ways Buildkite matches webhook builds to users.