GitHub
The Liftbay GitHub App and the build workflow in your repository.
Connect GitHub
In the dashboard, open GitHub and click Connect a GitHub account. GitHub asks where to install the Liftbay app; choose the user or organization that owns your app's repository, and either all repositories or only the ones you pick.
When you return, Liftbay checks with GitHub that your account can access that installation before linking it to your Liftbay organization. Builds can only start in repositories of installations linked to the build's own organization.
What the app can do
| Permission | Why |
|---|---|
| Actions: write | Start the Liftbay workflow and read its runs |
| Contents: write | Push the workflow to the liftbay/workflow branch, and create the temporary liftbay/build/* branches described below |
| Workflows: write | Required by GitHub for files under .github/workflows |
| Pull requests: write | Open the pull request that adds the workflow |
| Commit statuses: write | Show each build's result on the commit and pull request |
| Metadata: read | Required for every GitHub app |
The app receives push and pull_request events for build triggers, and workflow_run events to notice runs that end before their build.
Liftbay only pushes to liftbay/* branches. Protect your main branch and even Liftbay can't change it.
For each build, Liftbay uses a short-lived token limited to that one repository.
The workflow
Builds run as .github/workflows/liftbay.yml. Get it into your repo either way:
npx liftbay ci initwrites it locally; commit and push it.- Project settings → Propose workflow opens a pull request from
liftbay/workflow. Run it again after a runner update to get a pull request with the new version.
The workflow only runs when Liftbay starts it, never on your own pushes or pull requests. It needs contents: read and id-token: write, and no repository secrets: the runner exchanges the run's GitHub OIDC token for a job token, which Liftbay only issues to your project's repository and this workflow file, once per build.
Commit the workflow on every branch you build: GitHub runs the version on the branch being built.
Building a branch before the workflow is on your default branch
GitHub only lets apps start (workflow_dispatch) workflows that are on the repository's default branch. Until yours is, for example while you try Liftbay on a branch of its own, Liftbay starts each build differently:
- It creates a temporary branch
liftbay/build/<platform>/<build id>pointing at your branch's latest commit. - The workflow's
pushtrigger onliftbay/build/**runs the workflow from that commit. - Only a run on exactly that branch, at exactly that commit, can claim the build.
- The branch is deleted as soon as the build has started.
If you have other workflows that run on every push to any branch, they run once on these branches too. Limit them to your own branches (branches-ignore: ["liftbay/**"]), or merge the Liftbay workflow into your default branch, after which builds use workflow_dispatch.
Bring your own runner
To run a runner you built yourself, set repository variables in GitHub:
| Variable | Value |
|---|---|
LIFTBAY_RUNNER_URL / LIFTBAY_RUNNER_SHA256 | Your Linux liftbay-runner .tar.gz and its SHA-256 (Android) |
LIFTBAY_RUNNER_URL_MACOS / LIFTBAY_RUNNER_SHA256_MACOS | The same for macOS (iOS) |
See The runner.
Disconnect
Disconnect an account under GitHub in the dashboard. To remove Liftbay's access completely, also uninstall the app in GitHub's settings; Liftbay notices the uninstall straight away.