Documentation menu
Getting started
Dashboard & analytics
Managed runners
Team & notifications
Billing & plans
Workflow files
Migrate to Latchkey CI
Move a GitHub repository's CI from GitHub Actions to Latchkey CI on the dashboard's Migrate page: read its workflow files, plan each pipeline, carry its secrets, open the pull request, compare both side by side, then switch.
In short
- Move CI to Latchkey, on the dashboard's Migrate page, moves one repository in five steps: Connect, Plan, Secrets, Apply and Side by side.
- Latchkey reads your
.github/workflows/files as evidence and never runs them: it copiesrun:steps, maps known actions to Latchkey steps, and leaves the rest to a person. - Apply opens one pull request that adds a
.latchkey/workflows/file for each pipeline that moves. GitHub Actions keeps running beside Latchkey CI until you switch. - Until you switch, a failure of a pipeline you move fails no check. Switch to Latchkey CI opens a pull request that removes the GitHub Actions files your Latchkey files replace.
- An agent or a script runs the same migration with
latchkey migrate planandlatchkey migrate apply(CLI 0.5.0 or later).
Move CI to Latchkey, under Migrate in the dashboard sidebar, moves one GitHub repository's CI from GitHub Actions to Latchkey CI, which runs your pipelines from .latchkey/workflows/. Your repository stays on GitHub, and GitHub Actions keeps running beside Latchkey CI until you switch. Each change to the repository's files arrives as a pull request that a person merges.
The Migrate page offers two ways to migrate. This page covers Move CI to Latchkey, which changes what runs your pipelines. The other, Stay on GitHub Actions, run on Latchkey runners, keeps GitHub Actions and changes only the runs-on: labels of its jobs; Migrate from GitHub-hosted runners covers it.
Five steps for one repository#
Start from Move CI to Latchkey on the Migrate page, or from Move CI on a repository's row under Repositories. Anyone in the workspace can follow the steps, and an owner or admin makes the changes: connecting the repository, answering the plan, opening the carry and the pull request, answering Connect's question and switching. A member can set a secret's value by hand for the repository on the Secrets step.
What Latchkey reads#
On Connect, pick the repository and choose Read workflow files. Latchkey reads the GitHub Actions workflow files under .github/workflows/ at the head of the repository's default branch, never a pull request's head, and the secret names those files use, from their ${{ secrets.NAME }} references. No secret value is read on this step. What Latchkey read lists each workflow file as a pipeline, with its triggers and jobs, beside the secret names.
The files are evidence of what your CI does. Latchkey never runs them, and nothing runs while it reads them. A repository with no file under .github/workflows/ shows Nothing to migrate. For a repository with no CI yet, A file to start from gives a workflow file to commit as it is.
For an owner or admin, reading also connects the repository to Latchkey CI. A repository not yet on Latchkey CI is enrolled in advisory mode, which blocks no merge. One already on Latchkey CI stays on it once an apply of it is open or merged, or Connect's question has been answered: a failure of a pipeline already there still fails its check, and each pipeline you move from then on runs on trial until you switch it. Before either, reading puts a repository that is out of advisory mode, such as one whose Latchkey workflow files were written by hand, in advisory mode, so no Latchkey check fails until you switch. Then choose Make the plan.
What the plan translates and what it refuses#
The Plan step shows each pipeline, the file Latchkey would write for it and what happens to each of its steps. The file keeps its name: .github/workflows/ci.yml becomes .latchkey/. Each step gets one of three marks:
| Mark | What it means |
|---|---|
| Translated | A plain run: step, copied as written. Where GitHub and Latchkey CI differ, the step says what changed, such as GITHUB_SHA becoming LATCHKEY_CI_SHA. |
| Mapped | A known action, replaced by what Latchkey CI has: a Latchkey step, a latchkey cache or latchkey artifact command, or nothing when the runner already gives what the action asks for. |
| Needs a person | Latchkey cannot carry the step as written. Its row says why, and the plan waits for your answer. |
Latchkey does not emulate GitHub's actions: a GitHub action named with uses: never runs on Latchkey CI. Latchkey runs its own steps, written uses: latchkey/<name>@<version>. The plan maps actions/checkout, the cache and artifact actions, docker/build-push-action when it does not push, and the setup actions for Node, Python, Go, Java, .NET, Rust and PHP. A mapped action that asks for more, such as a version the runner image does not have and no Latchkey step downloads, or a registry login, needs a person. So does aws-actions/: a person can choose latchkey/aws-login for it, which signs in only once the AWS role trusts Latchkey (Cloud identity). So does docker/login-action: a person can choose latchkey/docker-login for it. Any other action needs a person, who writes it as a run: step or leaves it out.
runs-on: becomes a Latchkey runner size. The standard Ubuntu labels (ubuntu-latest, ubuntu-24.04, ubuntu-22.04 and ubuntu-20.04) become small, and Blacksmith's and Depot's x64 Ubuntu labels become the smallest size with at least as many vCPUs. A label for Windows, macOS, ARM, a self-hosted pool or a runner group names no size Latchkey can choose, so that job needs a person.
Latchkey never guesses a deploy, a publish or a database migration. Such a step needs a person, and a pipeline that deploys or publishes stays on GitHub Actions unless an owner or admin turns on Move this pipeline. A pipeline stays, and cannot move, when Latchkey can carry none of its triggers or cannot read its file. Latchkey does not start one workflow from another's run, so a pipeline started only by on: workflow_run stays, and the plan suggests putting that work in the same file as a job with needs:. A pipeline that stays keeps running on GitHub Actions.
A refusal reads as a sentence on the step, the job or the pipeline it concerns. Some of them, word for word:
| Where | What the plan says |
|---|---|
| A step that uses an action Latchkey does not map | An action Latchkey does not run. A person writes it as a run: step. |
| A deploy step | A deploy step. Latchkey never guesses one. |
| A step that uses GitHub's token | This step uses GitHub's own token, which a Latchkey CI job does not have. A person decides. |
| A job that calls a reusable workflow | This job calls the reusable workflow <workflow>, which Latchkey does not run. A person decides. |
| A pipeline named deploy that deploys | deploy stays on GitHub Actions. It deploys, and Latchkey moves no deploy without a person. |
| A file that is not valid YAML | .github/workflows/old.yml stays as it is. Latchkey could not read it: it is not valid YAML. |
An owner or admin answers each item from the choices on its row, such as Copy as written, Leave it out, Write a run: step, Dry run (a command of yours that runs in the step's place while its pipeline is on trial) or Hold on trial. A change that has no answer to give reads Change its workflow file or keep this pipeline on GitHub Actions. When every item has an answer, Use this plan goes on to Secrets. A pipeline whose file Latchkey CI would refuse as written gets no file, and the plan says so.
Carry the secrets#
The Secrets step lists, under Secrets your pipelines read, the secrets that the pipelines that move read. Latchkey never reads your GitHub secrets through GitHub's API, so the values reach the Latchkey vault one of two ways:
- Carry from GitHub, opened by an owner or admin: Latchkey opens a pull request that adds one workflow,
.github/. Merging it approves the carry: it runs once on GitHub, reads each named secret inside that GitHub job and sends it encrypted to the Latchkey vault. Then Latchkey opens a second pull request that removes the workflow.workflows/ latchkey-carry-secrets.yml - By hand: Set secret on a row, or Upload a .env file. A value is sealed when you save it, and Latchkey never shows it again.
A value that a job reads at an environment is not carried, and neither is GITHUB_TOKEN, which GitHub makes for each job: set each one on its row, where only an owner or admin sets a value at an environment. When no secret is waiting, choose Continue to apply.
The pull request#
On Apply, an owner or admin chooses Open pull request. Latchkey opens one pull request titled Run CI on Latchkey CI, on a latchkey/ branch, adding a .latchkey/workflows/ file for each pipeline that moves, with its cache steps. The Apply step lists the files in it, and its description names the pipelines that stay on GitHub Actions and the steps your answers left out. Opening a new one closes the open pull request of any earlier apply of the repository.
Nothing in it removes or disables a GitHub Actions file: GitHub Actions keeps running your files until you switch. Merging it starts side by side, billed at this workspace's runner rate after its included minutes.
Trial runs and advisory mode#
Until you switch, Latchkey CI runs the moved pipelines as a trial beside GitHub Actions. In a repository in advisory mode, a Latchkey CI failure is written to your code host as a neutral check whose title names the real outcome, such as Advisory: failed, so no Latchkey check fails and none blocks a merge. In a repository already on Latchkey CI, each moved pipeline is on trial while a commit still holds the GitHub Actions file it replaces: its failure fails no check, while the pipelines already there still fail theirs.
A trial run is not meant to deploy. A job that names an environment:, or whose every step can publish, is held and runs nothing unless its file says otherwise with advisory:, and a job with a dry run runs its dry run. A job that is not held and has no dry run runs as written, its deploy included. A trial run's identity token carries a sub that starts with advisory:, which a cloud role written for live runs does not trust. Trial runs and dry runs has the full rules.
Side by side#
The Side by side step compares the two CIs on the same commits. It starts with the first push after you merge the Apply step's pull request. A Latchkey CI failure shows here. A failure of a pipeline you move fails no check on your pull requests, and in a repository already on Latchkey CI the pipelines already there still fail theirs.
Side by side so far counts Commits compared, Same result (both passed or both failed), Different result, and Latchkey CI so far: the small-equivalent minutes, billed at your rate. Same commits, both runs lists each commit run on both:
| Column | What it shows |
|---|---|
| Commit | The commit both CIs ran |
| GitHub Actions | GitHub's own conclusion for the commit, read from GitHub when the page loads |
| Latchkey CI | The Latchkey CI run's result, tagged Trial run for a trial run, with the jobs it held and the ones that ran their dry runs |
| Result | Same result or Different result. Where Latchkey compared the pipelines you are moving for the run, the result is that compare, and the row says Compared on the pipelines you are moving when it differs from the two columns. Otherwise it compares GitHub's result for the whole commit with the whole Latchkey CI run's, and a commit is compared only when each side has a passed or failed result |
Open a row with a different result to see the job, and the step, that failed on Latchkey CI, with Open the run and Copy for support, which copies the ids Latchkey support needs. The estimate above the table says what side-by-side runs cost: Latchkey CI bills them at this workspace's runner rate, after its included minutes, and once it has billed a run, the estimate gives the minutes and cost of a run, and the cost of a week at the number of runs a week it names.
Connect: which GitHub Actions files are replaced#
Once Latchkey has read the workflow files, Connect asks an owner or admin: Which GitHub Actions files do your Latchkey workflow files replace? Mark each file Replaced and name the file that replaces it under Replaced by, a file directly under .latchkey/workflows/ that ends in .yml or .yaml, or answer They replace none. Then choose Save answer. A member sees the answer, or that no one has given one yet.
Latchkey keeps the answer with the files each apply was made from, and that record decides two things: while a commit still holds one of those files, the pipeline that replaces it is on trial, and Switch to Latchkey CI removes them. Side by side compares each recorded file with the Latchkey workflow file that replaces it, so while no file in the answer has its replacement named, there is nothing to compare and the switch waits. A repository whose Latchkey workflow files were written by hand, with no apply, goes from Connect to Side by side once the question is answered, and cannot switch before.
Switch to Latchkey CI#
When you trust the results, an owner or admin chooses Switch to Latchkey CI on Side by side, which waits until a commit has passed or failed on both. Switching opens a pull request titled Run CI only on Latchkey CI that removes the GitHub Actions files your Latchkey workflow files replace, and takes the repository out of advisory mode at once: from then on a Latchkey CI failure fails its check, unless its pipeline is on trial.
A pipeline stays on trial on every commit that still holds the GitHub Actions file it replaces, so it leaves trial runs on the commits that follow the merge of the switch pull request, and GitHub Actions stops running the removed workflows. When the answer is that your Latchkey files replace none, or the files are already gone, switching opens no pull request: it takes the repository out of advisory mode or, for one already on Latchkey CI, records the switch.
- Before you merge the switch pull request, take out of branch protection any check that comes from a workflow it removes: that check never reports again, so it would block the merge.
- A workflow that stays on GitHub Actions and runs
on: workflow_runafter a removed workflow stops running, or runs less often, once the switch pull request is merged. The pull request names each one first. To keep its work, move it into the Latchkey workflow file as a job withneeds:. - If the repository requires signed commits, Latchkey opens no pull request and changes nothing: remove the files yourself, then switch again.
Migrate from the CLI#
A coding agent or a script runs the same migration from the Latchkey CLI, with the same plan the dashboard draws; the Migrate page's For agents panel shows the commands for the repository you picked. latchkey migrate needs CLI 0.5.0 or later.
| Command | What it does |
|---|---|
latchkey migrate plan <owner/name> | Reads the GitHub Actions workflow files at the head of the default branch and prints the plan: for each pipeline, whether it moves, and each step, job or change that needs a person's answer. It writes nothing to the repository. --output json prints the plan exactly as Latchkey serves it. |
latchkey migrate apply <plan-id> | Opens the one pull request that adds the plan's Latchkey CI workflow files, once every item that needs a person has an answer, and closes the open pull request of any earlier apply of the repository. A person merges it. |
latchkey migrate status <owner/name> | Shows the repository's newest migration pull request and where it stands: open, merged, closed, or superseded by a newer apply. |
The repository must already be connected to Latchkey CI: an owner or admin connects it on the Connect step. Any key can read a plan. apply needs a key created with Allow opening migration pull requests, and works only while the person who created the key is an owner or admin.
Give answers and moves in a JSON file passed with --answers, in the shape the plan names them. A move of false keeps a pipeline on GitHub Actions:
{ "answers": [{ "pipeline": ".github/workflows/ci.yml", "job": "test", "step": 4, "answer": "leave_out" }], "moves": [{ "pipeline": ".github/workflows/release.yml", "moves": false }] }
Each answer or move gives the plan a new id. plan saves each plan it prints on your machine, under ~/ by default, with the answers and moves it was made with, so apply needs only the id and works on the machine and account that made the plan; anywhere else, plan again. Latchkey reads the plan again before it opens the pull request, and refuses when the plan is out of date or an item still needs an answer. apply is sent once: if its answer is lost, run latchkey migrate status before applying again.
The CLI stops at the pull request: the carry, Connect's question, Side by side and the switch are on the Migrate page, and latchkey secrets set sets a secret for the repository. An agent connected over MCP has the tools plan_migration, apply_migration and get_migration (Connect your AI agent).
Q.01Does Latchkey run my GitHub Actions workflow files?
No. Latchkey reads them as evidence of what your CI does and writes Latchkey CI workflow files from them. It never runs a GitHub Actions file and does not emulate GitHub actions: a known action becomes a Latchkey step, and any other action needs a person.
Q.02Can I keep some pipelines on GitHub Actions?
Yes. Turn off Move this pipeline on the Plan step, and that pipeline stays on GitHub Actions. A pipeline that deploys or publishes stays unless you turn it on. The switch removes only the GitHub Actions files your Latchkey workflow files replace.