PANGEA / CI
Your agent connects CI, then publishes.
Give your usual coding agent the request from repository setup. It discovers your existing tests, registers Pod-native CI in an enabled workspace, checks real results, and publishes the tested app. Running apps and existing CI remain in place.
Check access first
Use the private connection file from Connect your AI. The HTTPS API base is https://pangea.host/api/agent; authenticate with its existing workspace read/deploy credential. Keep credentials out of conversation, Git, command arguments and logs.
GET /ci/registration returns eligibility, workspace limits and the fixed GitHub App installation URL. Card-verified Free Sandbox, Mini through Scale, Custom plans, and invited beta workspaces include self-service CI registration within each plan’s repository and concurrency limits (cardless Free Sandbox workspaces unlock CI upon completing a $0 card check or upgrading to Mini+). If REGISTRATION_DISABLED or PLAN_UPGRADE_REQUIRED is returned for a non-enabled workspace, stop and report that activation or upgrade is needed rather than bypassing it. The repository owner must select the repository in GitHub and approve the App; organization approval may also be required.
Register Pod-native CI
Verify the canonical repository name and numeric ID through the authenticated GitHub API. The temporary GitHub user credential must prove repository admin access. Set actors to that verified user only. Prepare a standard GitHub Actions workflow on the chosen branch with one runner label per job:
jobs:
verify:
runs-on: example-ci-verify-${{ github.run_id }}
steps:
- uses: actions/checkout@v4
- run: npm ci
- run: npm testPOST the following shape to /ci/registrations; use actual discovered commands and resources within the returned workspace limits. Read temporary proof from a private local file and construct the body in memory. Do not print or retain it.
{
"request": {
"name": "example-ci",
"repository": "owner/example",
"repository_id": 123456,
"branch": "main",
"actors": [
"verified-github-admin"
],
"workflows": "*",
"jobs": {
"verify": {
"runtime": "node-24",
"default_container": "app",
"services": [
{
"preset": "postgres-17",
"env": {
"POSTGRES_DB": "app_test"
}
},
"redis-7"
],
"resources": {
"cpu_m": 4000,
"memory_mib": 4096,
"scratch_mib": 8192
},
"timeout_seconds": 1200
}
}
},
"github_token": "TRANSIENT_PRIVATE_USER_PROOF_NOT_A_LITERAL_VALUE"
}Enrolled jobs schedule dynamically across the platform’s capability-attested node_pool rather than static host pins, and every Pod-native container and service sidecar counts toward the workspace CPU, memory, temporary-storage and concurrency ceilings.
Standard run: steps & tool containers
Setting runtime (such as node-24, node-22, python-3.13, python-3.12, php-8.4, go-1.24, or rust-1) or explicit containers with default_container: "app" routes every GitHub Actions run: step transparently into that unprivileged container with the step’s working directory, environment variables, GITHUB_ENV, GITHUB_OUTPUT and GITHUB_PATH preserved—no pangea-exec wrapper is needed in .github/workflows/*.yml. Multi-container jobs can still invoke pangea-exec <other-alias> -- ... when targeting a secondary tool container.
Disposable tool containers automatically mount group-writable ephemeral scratch directories at /tmp, /var/tmp, /var/cache, /var/log and /run (or custom non-overlapping writable_mounts paths), so standard servers and package managers run as non-root without custom Dockerfile symlink workarounds.
Managed non-privileged service presets
Declare ephemeral backing services in services by preset name or preset dictionary with safe environment overrides. Every preset runs as an unprivileged non-root UID on tmpfs or bounded scratch storage and resolves on 127.0.0.1 as well as its service alias:
postgres-17— PostgreSQL 17 on port5432(aliaspostgres, memory-backed/var/lib/postgresql/data, defaultPOSTGRES_USER=postgres,POSTGRES_DB=test, trust auth unlessPOSTGRES_PASSWORDis set).mysql-8— MySQL 8.4 on port3306(aliasmysql, memory-backed/var/lib/mysql, defaultMYSQL_DATABASE=testand empty password unlessMYSQL_ROOT_PASSWORDis set).redis-7— Redis 7 on port6379(aliasredis, memory-backed/data, persistence disabled for fast isolated tests).meilisearch-1— Meilisearch v1 on port7700(aliasmeilisearch, ephemeral/meili_data, analytics disabled).
Workflow updates & hash rotation
Non-privileged Pod-native profiles (without docker: true or injected deployment credentials) support workflows: "*", allowing any .github/workflows/*.yml in verified same-repository commits and pull requests to run automatically as workflows evolve. Fork pull requests remain strictly rejected, and the exact observed workflow_sha256 is recorded in job metadata for auditability.
Profiles that enable isolated docker: true (where permitted for the workspace) or explicit workflow pinning require 1 to 8 SHA-256 digests per workflow file so active pull requests and main can coexist during transitions. Rotate allowed hashes in one command without operator SSH—either through the pangea_update_ci_workflows MCP tool, PUT /projects/PROJECT_ID/workflow-policy, or the CLI:
# Hash local workflow file(s) automatically and update the active policy
pangea ci-workflows PROJECT_ID --from-file .github/workflows/ci.yml
# Keep both current main and a candidate PR hash active (up to 8 hashes)
pangea ci-workflows PROJECT_ID --from-file .github/workflows/ci.yml --sha256 CURRENT_MAIN_SHA256
# Switch an eligible non-privileged Pod-native profile to same-repo mode
pangea ci-workflows PROJECT_ID --allow-same-repoOptional platform: "macos-arm64" runs unsigned iOS Simulator builds in isolated ephemeral VMs when macOS CI is enabled for the workspace. Privileged Docker is never available to arbitrary public code.
Resume and verify
Keep the returned project ID. Use GET /ci/registrations/PROJECT_ID to read the receipt, and repeat the same request if its response was lost. GITHUB_INSTALLATION_REQUIRED means the owner must complete repository selection before retrying.
registered means CI is configured, not that tests passed. Run the real workflow and inspect GitHub conclusions plus GET /projects/PROJECT_ID/jobs. Queued or skipped checks do not count as success. New repositories share the workspace and platform concurrency, CPU, memory and temporary-storage ceilings.
Opt-in pull-request previews
Instead of launching an environment on every trivial pull request, pair standard GitHub labeled / unlabeled / closed events and workflow_dispatch with pangea preview up and pangea preview down—no custom reconciliation scripts are needed in your repository:
name: PR Preview
on:
pull_request:
types: [labeled, unlabeled, synchronize, reopened, closed]
workflow_dispatch:
inputs:
pr: { description: "Pull request number", required: true, type: number }
action: { description: "Preview action", required: true, default: up, type: choice, options: [up, down] }
concurrency:
group: pangea-preview-${{ github.event.pull_request.number || inputs.pr }}
cancel-in-progress: true
jobs:
preview:
if: >-
github.event_name == 'workflow_dispatch' ||
(github.event.pull_request.head.repo.full_name == github.repository && (
(github.event.action == 'labeled' && github.event.label.name == 'preview') ||
(github.event.action == 'unlabeled' && github.event.label.name == 'preview') ||
(contains(github.event.pull_request.labels.*.name, 'preview') &&
contains(fromJSON('["synchronize","reopened"]'), github.event.action)) ||
github.event.action == 'closed'
))
runs-on: example-ci-preview-${{ github.run_id }} # Pangea runners inject pangea CLI + job-scoped PANGEA_TOKEN automatically
steps:
- uses: actions/checkout@v4
if: github.event.action != 'closed' && github.event.action != 'unlabeled' && inputs.action != 'down'
- id: preview
run: |
PR="${{ github.event.pull_request.number || inputs.pr }}"
if [ "${{ github.event.action }}" = "closed" ] || [ "${{ github.event.action }}" = "unlabeled" ] || [ "${{ inputs.action }}" = "down" ]; then
pangea preview down --pr "$PR"
else
pangea preview up --pr "$PR"
fiEvery Pangea-managed GitHub Actions job automatically receives the pangea CLI on PATH (including inside node-*, php-*, go-*, rust-*, and python-* workload containers) and a short-lived, ES256-signed job credential injected as a read-only file at PANGEA_CI_TOKEN_FILE (alongside PANGEA_TOKEN compatibility) scoped strictly to that repository—so workflows running on Pangea runners require zero manually issued tokens or GitHub Secrets. Pull-request runs can read same-repository base metadata and create, update, stop, or purge stateless preview apps while stateful apps remain read-only; enrolled default-branch runs can deploy same-repository apps that are not deploy-locked. (If you run the workflow on external GitHub-hosted ubuntu-latest runners instead, install pangea-cli and supply PANGEA_TOKEN from repository secrets.)
pangea deploy and pangea preview up both support monorepo subdirectories directly when that subdirectory contains its own Dockerfile (plus repo .gitignore and subdirectory .dockerignore / .pangeaignore exclusions). pangea preview up automatically inherits HTTP port, health path, resource limits, default 1-hour idle sleep settings, and GitHub repository App Group linking from your local pangea.yaml (including optional preview: defaults) or --clone-from PROJECT_ID, streams real-time build and deployment logs directly into the GitHub Actions job log, and pairs with pangea preview down to wait cleanly and permanently purge stateless previews when the preview label is removed or the pull request closes (including on enrolled non-privileged Pod-native runners). Both preview commands write clickable URLs and status directly to GITHUB_STEP_SUMMARY and export preview_url, project_id, and preview_name to GITHUB_OUTPUT. Coding agents can also drive previews directly via pangea_preview_up, pangea_preview_down, and pangea_delete_project in pangea mcp.
Publish the tested revision
After the exact revision passes, use the existing app creation and deployment instructions. Include its verified github_repository_id when creating the app to group app and CI in Your apps. Preserve app IDs, URLs and data on retries; verify the public HTTPS response and actual behavior. Report CI success and publication separately.
This flow does not silently grant future push-to-production access. Automatic delivery credentials require their own approved binding. GitHub API and billing restrictions still apply even when compute runs on Pangea.