docs guides Moving from GitHub Actions
09-moving-from-github-actions.md GuidesNov 22, 2026

Moving from GitHub Actions

A GitStack repository mirrored to GitHub can gate landing on GitHub Actions. This page moves it to Buildkite instead: what replaces each part of a workflow, a converted example, and an order of changes that keeps a required check in place at every step.

The split is the same as on GitHub. GitStack sends the events, gates landing on the results and issues the repository's token. Buildkite runs the jobs on your agents and holds the pipeline and its secrets. If your builder isn't Buildkite, the same plan works with CI with any builder.

What replaces what#

GitHub Actions On GitStack with Buildkite
on: pull_request A review's commit builds when a land needs its checks, when someone presses Run checks, or with gs review ci. Pushing a review starts nothing. GITSTACK_EVENT is review.
on: push to the default branch The default branch builds after every land, with no setting. GITSTACK_EVENT is main.
on: push with branches branches under [ci] in .gitstack/policy.toml. GITSTACK_EVENT is push.
on: push with tags tags under [ci]. Only new tags build, since a tag never moves. GITSTACK_EVENT is tag.
on: schedule A Buildkite pipeline schedule. Scheduled builds show in Buildkite only: they never gate a land or start an auto-revert.
on: workflow_dispatch New Build in Buildkite, or its API.
A job, and the check name branch protection requires A step with a key, reported as <pipeline>/<key> and required as buildkite:<pipeline>/<key> under [checks].
needs: A wait step or depends_on in the pipeline.
if: startsWith(github.ref, 'refs/tags/') if: build.env("GITSTACK_EVENT") == "tag". A tag build's branch is the tag's name, and Buildkite's own build.tag is empty.
github.sha, github.ref, github.event_name BUILDKITE_COMMIT, GITSTACK_REF, GITSTACK_EVENT. GITSTACK_REPO, GITSTACK_REVIEW and GITSTACK_STACK name the repository, review and branch.
runs-on The agent queue a step runs on (agents: queue:), on Buildkite's hosted agents or your own.
actions/checkout The agent clones the pipeline's repository URL, the GitStack clone URL, with the integration's token as the git password. On hosted agents the token is a Buildkite secret (see Set it up).
secrets.* Your agents' secrets. GitStack never sees them and puts none of its own in a build.
GITHUB_TOKEN with contents: write, to push tags The token's tags right. It creates tags on landed commits and never moves or deletes one. A tag GitStack makes is pushed to the GitHub mirror too.
GITHUB_TOKEN with contents: write, to push branches The token's branches right, limited to the patterns you give it. Never the default branch or a review branch.
GITHUB_TOKEN with pull-requests: write, to comment The token's comment right: a review comment shown as the integration with a bot label.
checks: write, statuses: write Not needed: Buildkite reports its builds to GitStack itself. A builder without a connector posts checks with the checks right.
Re-run failed jobs Run checks or gs review ci retries the failed jobs of a failed build. Retrying a job in Buildkite works too.
concurrency with cancel-in-progress, on the default branch A land cancels the default branch's older builds that still run, and never one auto-revert is using. Leave Buildkite's Cancel intermediate builds off.
A step named Setup: ..., so auto-revert reads its failure as setup Exit status 75 from the step's setup commands (see When the default branch goes red).
A red default branch, reverted by hand on_red = "revert" under [landing], the default: GitStack retries the failed jobs once, then reverts the land that broke the branch.
The GitHub mirror Optional. Buildkite builds from GitStack directly.
GitHub Actions
on: pull_request
On GitStack with Buildkite
A review's commit builds when a land needs its checks, when someone presses Run checks, or with gs review ci. Pushing a review starts nothing. GITSTACK_EVENT is review.
GitHub Actions
on: push to the default branch
On GitStack with Buildkite
The default branch builds after every land, with no setting. GITSTACK_EVENT is main.
GitHub Actions
on: push with branches
On GitStack with Buildkite
branches under [ci] in .gitstack/policy.toml. GITSTACK_EVENT is push.
GitHub Actions
on: push with tags
On GitStack with Buildkite
tags under [ci]. Only new tags build, since a tag never moves. GITSTACK_EVENT is tag.
GitHub Actions
on: schedule
On GitStack with Buildkite
A Buildkite pipeline schedule. Scheduled builds show in Buildkite only: they never gate a land or start an auto-revert.
GitHub Actions
on: workflow_dispatch
On GitStack with Buildkite
New Build in Buildkite, or its API.
GitHub Actions
A job, and the check name branch protection requires
On GitStack with Buildkite
A step with a key, reported as <pipeline>/<key> and required as buildkite:<pipeline>/<key> under [checks].
GitHub Actions
needs:
On GitStack with Buildkite
A wait step or depends_on in the pipeline.
GitHub Actions
if: startsWith(github.ref, 'refs/tags/')
On GitStack with Buildkite
if: build.env("GITSTACK_EVENT") == "tag". A tag build's branch is the tag's name, and Buildkite's own build.tag is empty.
GitHub Actions
github.sha, github.ref, github.event_name
On GitStack with Buildkite
BUILDKITE_COMMIT, GITSTACK_REF, GITSTACK_EVENT. GITSTACK_REPO, GITSTACK_REVIEW and GITSTACK_STACK name the repository, review and branch.
GitHub Actions
runs-on
On GitStack with Buildkite
The agent queue a step runs on (agents: queue:), on Buildkite's hosted agents or your own.
GitHub Actions
actions/checkout
On GitStack with Buildkite
The agent clones the pipeline's repository URL, the GitStack clone URL, with the integration's token as the git password. On hosted agents the token is a Buildkite secret (see Set it up).
GitHub Actions
secrets.*
On GitStack with Buildkite
Your agents' secrets. GitStack never sees them and puts none of its own in a build.
GitHub Actions
GITHUB_TOKEN with contents: write, to push tags
On GitStack with Buildkite
The token's tags right. It creates tags on landed commits and never moves or deletes one. A tag GitStack makes is pushed to the GitHub mirror too.
GitHub Actions
GITHUB_TOKEN with contents: write, to push branches
On GitStack with Buildkite
The token's branches right, limited to the patterns you give it. Never the default branch or a review branch.
GitHub Actions
GITHUB_TOKEN with pull-requests: write, to comment
On GitStack with Buildkite
The token's comment right: a review comment shown as the integration with a bot label.
GitHub Actions
checks: write, statuses: write
On GitStack with Buildkite
Not needed: Buildkite reports its builds to GitStack itself. A builder without a connector posts checks with the checks right.
GitHub Actions
Re-run failed jobs
On GitStack with Buildkite
Run checks or gs review ci retries the failed jobs of a failed build. Retrying a job in Buildkite works too.
GitHub Actions
concurrency with cancel-in-progress, on the default branch
On GitStack with Buildkite
A land cancels the default branch's older builds that still run, and never one auto-revert is using. Leave Buildkite's Cancel intermediate builds off.
GitHub Actions
A step named Setup: ..., so auto-revert reads its failure as setup
On GitStack with Buildkite
Exit status 75 from the step's setup commands (see When the default branch goes red).
GitHub Actions
A red default branch, reverted by hand
On GitStack with Buildkite
on_red = "revert" under [landing], the default: GitStack retries the failed jobs once, then reverts the land that broke the branch.
GitHub Actions
The GitHub mirror
On GitStack with Buildkite
Optional. Buildkite builds from GitStack directly.

The token's rights are set when you make it, in the repository's Settings, CI checks. See Writing back from a build.

A worked example#

A typical workflow lints and tests every pull request and every push to main, and publishes a release for each v* tag:

yaml
# .github/workflows/ci.yml
name: ci
on:
  pull_request:
  push:
    branches: [main]
    tags: ["v*"]

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: make lint

  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: make test

  release:
    if: startsWith(github.ref, 'refs/tags/v')
    needs: [lint, test]
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: make release
        env:
          REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}

Its landing policy requires the two jobs by their GitHub check names:

toml
# .gitstack/policy.toml, before
[checks]
required = ["lint", "test"]

In Buildkite, with a pipeline named api, the same work is one file. The checkout is the agent's, and REGISTRY_TOKEN comes from the agent's secrets rather than the file:

yaml
# .buildkite/pipeline.yml
steps:
  - label: "Lint"
    key: lint
    command: make lint

  - label: "Test"
    key: test
    command: make test

  - wait

  - label: "Release"
    key: release
    if: build.env("GITSTACK_EVENT") == "tag"
    command: make release

The policy requires the Buildkite steps and builds v* tags. Reviews and the default branch need no entry, since GitStack builds them on its own:

toml
# .gitstack/policy.toml, after
[checks]
required = ["buildkite:api/lint", "buildkite:api/test"]

[ci]
tags = ["v*"]

Switch over without a gap#

Each policy change below lands as a review, and the policy that applies to a land is the one already on the default branch. Every land along the way is gated by at least one CI.

  1. Connect Buildkite. Land .buildkite/pipeline.yml, then create the pipeline and connect it as in Quickstart: CI with Buildkite, steps 1 to 6. GitHub Actions still gates landing.

  2. Require both. Add the Buildkite checks beside the GitHub ones:

    toml
    [checks]
    required = ["lint", "test", "buildkite:api/lint", "buildkite:api/test"]
    

    Each land now waits for both, so you can compare the two on the same changes. A land asks Buildkite to build any commit it hasn't built yet.

  3. Require only Buildkite. Once the Buildkite checks have passed and failed where GitHub's did, drop the GitHub names:

    toml
    [checks]
    required = ["buildkite:api/lint", "buildkite:api/test"]
    
    [ci]
    tags = ["v*"]
    

    Add [ci] entries for any branch or tag pushes the workflows built. If [checks] has a dispatch workflow, remove it in the same change.

  4. Remove the workflows. Delete the files under .github/workflows in a review. GitHub stops running them once the mirror receives the change.

  5. Remove the GitHub mirror, if you don't need it. Keep it if anything else reads the GitHub copy. Otherwise, in the repository's Settings, GitHub, choose Remove mirror. GitStack stops pushing to GitHub and stops importing its pull requests and issues; nothing on GitHub changes. Two things have to go first, and the section lists each one before you press the button:

    • Branches under github_managed in [mirror]. GitHub owns them, so remove them from the list in a review first.
    • Open reviews made from GitHub pull requests. Merge or close each pull request on GitHub, or abandon the review.

    If the policy still requires a check only GitHub reports, the confirm names it: lands that require it are refused until you change the policy, which step 3 already did. Owners can also remove the mirror with DELETE /api/v1/repos/<namespace>/<name>/mirror/github, and mirror the repository again later with gs repo mirror-github.

What doesn't carry over#

  • Marketplace actions. A uses: step has no Buildkite equivalent. Replace it with the command it wraps, a script in the repository, or a Buildkite plugin.
  • GitHub Releases, GitHub Packages and the GitHub Container Registry. These are GitHub's hosting, not CI. The release step publishes wherever the repository chooses: a container registry, a package index, a file store.
  • Caches and artifacts from actions/cache and actions/upload-artifact. Use Buildkite's artifacts and your agents' own caches.
  • Environments and deployment approvals. Use Buildkite's block steps and its own permissions.