GitHub merge queue integration
Buildkite now has built-in support for GitHub merge queues. You can now opt into creating and canceling builds based on merge_group
webhook events from GitHub. These builds are identified as merge queue builds in the Buildkite UI, and build behavior can be customized based on merge queue-specific attributes.
🆕 What’s new
- Create builds when a merge group is added to the merge queue: Rather than rely on triggering a build based on unique
gh-readonly-queue/*
branches, builds can now be triggered in response to amerge_group
webhook event. - Optionally cancel in-progress builds when a merge group becomes invalid: Cancel any running builds belonging to a destroyed merge group (e.g. when the merge queue entry is replaced due to a pull request being removed from the queue).
- Identify merge queue builds in the Buildkite UI: Merge queue builds are listed separately at the top of the pipeline page, and builds can be filtered by the merge queue they belong to.
- Vary pipeline behavior for merge queue builds: Utilize new build conditionals (
build.merge_queue.base_commit
,build.merge_queue.base_branch
) and environment variables (BUILDKITE_MERGE_QUEUE_BASE_COMMIT
,BUILDKITE_MERGE_QUEUE_BASE_BRANCH
) to modify the behavior of your pipeline. - Avoid redundant work using
if_changed
during step uploads: For appropriate merge queue configurations, the agentif_changed
attribute can useBUILDKITE_MERGE_QUEUE_BASE_COMMIT
to determine which steps to run based on the contents of the pull request – particularly useful for monorepos.
For full details about these features and the interaction between GitHub merge queues and Buildkite see our tutorial or watch the video below:
Mark
Start turning complexity into an advantage
Create an account to get started with a 30-day free trial. No credit card required.

