v1 and Rigbox CLI v0.12.64 or newer. GitHub OIDC deployments must be enabled for your Rigbox account. GitHub App webhooks and automatic pull-request preview environments are separate, planned features.
Prepare the manifest
Every app deployed from CI must declaresource.kind: git and the HTTPS URL of the workflow’s repository. Local source deployments are rejected before deployment starts. For a private repository, also set reproducible: true on every app.
Add the source settings to your existing rig.yaml:
source and reproducible in each app definition. See Deploying with rig deploy for manifest shapes.
The deployed source is the exact GITHUB_SHA from the workflow. The CLI records that SHA in the build inputs and release provenance. A new commit changes the reproducible image cache key, even when the branch name stays the same. The git path does not rsync the runner’s checkout over the server-side clone.
Link the repository once
From your project directory on your machine, authenticate with your full Rigbox account credential and link an existing workspace:--private to make the link preflight check the required reproducible settings:
--workspace accepts a name or ID. --from <directory> selects another project directory for manifest validation. The Action takes its target from this binding, so a fresh checkout without .rig.lock deploys to the same workspace.
The new binding is pending for 24 hours. The first claim relies on control of the configured repository name during this window; verify the name before linking. Its first successful OIDC exchange claims it and makes it active. If the window expires, rerun the same link command and then run the workflow. Repeating the command for an active binding preserves its identity.
Once claimed, the binding stores GitHub’s immutable repository and owner IDs. A deleted-and-recreated repository cannot inherit access by taking the same name. Repository ownership transfers require the Rigbox account owner to unlink and link again; the old owner ID is rejected.
rig ci status without --repo to list your bindings. These setup commands require an account credential; a deployment credential cannot manage bindings.
Add the workflow
Create.github/workflows/deploy.yml in the linked repository:
main if needed. Keep changes to the deployment workflow under the repository’s normal review controls. You can pin the Action to a reviewed commit rather than a moving major-version tag.
The Action requests the audience https://api.rigbox.dev, validates the exchanged repository and commit, then runs rig deploy --workspace <bound-id> --output json. Both identity and deploy credentials are masked immediately. For private source, it forwards the job’s ephemeral github.token to the builder; no token is stored in the manifest or build record. Public source is fetched anonymously. CI does not create or register an account SSH key.
First image deployment to an existing workspace
A workspace that is not already image-pinned may require explicit consent before its first reproducible deployment. Re-imaging replaces the workspace filesystem and discards files stored there. Back up data you need to keep, then set this input for that setup deployment:reimage after setup. It defaults to false; the Action never enables disk replacement automatically. Keep durable data in persistent volumes.
Inputs and runner support
Linux x64 and macOS Intel/Apple Silicon are supported. The installer verifies the release asset’s SHA256 digest before executing it. Linux ARM fails explicitly while no
rigbox-linux-arm64 asset is published. Runners need Bash and Python 3.9 or newer.
Application environment values
Workflowenv: supplies values for the manifest’s existing secrets declarations:
GET /apps, rig app env ls --reveal, or JSON environment output. The manifest’s secrets field reads values without committing them to rig.yaml; it is not an encrypted Rigbox secrets store. Encryption at rest and restricted readback remain separate work.
Results and failures
The Action reads the CLI’s terminaldeploy_finished event, including partial failures. It exposes workspace-id, url (the first app URL), apps (JSON app outcomes), success, failures, duration-ms, result (the full event), and exit-code.
A failed app fails the job even when other apps succeeded. The CLI’s nonzero exit code is preserved. If deployment fails before its terminal event, only the workspace ID, failure status, and exit code are available. Use if: always() on a follow-up step when reading failure outputs.
Deployment credentials expire after 60 minutes and cannot be reused to manage the account or another workspace. Each GitHub identity token can be exchanged once; rerun the workflow to request a new identity instead of replaying a captured token.