Run Reis, the Bahriya CLI, in CI/CD pipelines: authenticate with REIS_TOKEN, use JSON output and exit codes, with GitHub Actions and GitLab CI examples.
Updated 8 Jun 2026·4 min read
Reis is designed to work in automated environments. Use environment variables for authentication, JSON output for machine-readable results, and YAML files for declarative deployments.
For container-first pipelines, the easiest option is the public Reis image at 1x.ax/bahriya/library/reis. It's multi-arch (linux/amd64, linux/arm64), has reis as its entrypoint, and ships with git and ca-certificates already installed — so you can clone, build, and apply in a single image.
Pin a specific tag in CI so an upstream release cannot change your build:
Maintain your infrastructure as YAML files in your repository:
infra/ secrets.yml registries.yml containers.yml
Or combine everything in one file:
# infra/production.ymlkind: secrethandle: db-urlname: Database URLvalue: "${DB_URL}" # Note: env var substitution is NOT supported in YAML # Use the API or interactive mode for dynamic secrets---kind: containerproject: my-projecthandle: web-apiname: Web APItype: httpregions: - falkenstein-1 - virginia-1workload: image: ghcr.io/myorg/api:v2.0.0 cpu: "500" memory: "512" port: 8080 healthcheck: /healthzscaling: replicas: 2 max_replicas: 8 target_cpu: 70networking: external: true
Check the file in an earlier pipeline step, then apply it:
reis apply -f infra/production.yml --dry-run # fails the step on any problem; needs no credentialsreis apply -f infra/production.yml --yes
--yes confirms changes that clear or reset values in a non-interactive run; without it, such an update leaves the resource unchanged and fails the step. See Applying a file that would clear or reset values.