Prerequisites
- Install the CLI on your machine and run
rig --version. Use v0.13.0 or newer. - Have an existing target workspace and a GitHub repository where you can add workflows.
- Enable GitHub OIDC deployments for your Rigbox account.
- Prepare a working app with known install/start commands, port, and health path.
1. 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 incremental deployment, declare workspace.deployment.strategy: incremental. Private Git source is supported by the v0.13 incremental path using the job token. For image deployment, set reproducible: true on every app.
Add the source settings to your existing rig.yaml:
source in each app definition and strategy in the root workspace block. 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 source provenance. Incremental deployment prepares managed app releases; image deployment uses a frozen build whose inputs include the revision. Neither path should silently deploy an uncommitted runner checkout instead of the verified commit.
2. Link the repository
From your project directory on your machine, authenticate with your full Rigbox account credential and link an existing workspace:rig ci link --private preflight still requires reproducible: true for each app. For a private incremental project, keep that field to pass linking and also declare workspace.deployment.strategy: incremental explicitly so it overrides the reproducible default. Then link with --private:
--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.
3. 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 supplies the job’s ephemeral github.token for authenticated source retrieval; 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
This section applies only when the manifest selects image strategy. Do not enable re-image for an incremental deployment. 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.
4. Run and verify
Commit the manifest and workflow, then push to the configured branch or run the workflow manually from GitHub’s Actions tab. Open the deployment job and inspect its result. Userig ci status --repo YOUR_ORG/YOUR_REPO to confirm the binding is active after the first successful identity exchange. Check the job’s success, app outcomes, and URL; a successful identity exchange alone does not mean the app deployed successfully. See Results and failures if the job fails.
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.