Skip to main content
The GitHub provider syncs resources from GitHub into Ctrlplane’s inventory—currently supporting pull requests as deployment targets.

Prerequisites

  • ctrlc CLI installed
  • GitHub personal access token or GitHub App
  • Ctrlplane API key

Supported Resources

Authentication

Set your GitHub token:

Pull Requests

Sync GitHub pull requests as resources for preview environments:

Resource Metadata

Each pull request is synced with metadata:

Use Case: Preview Environments

Sync PRs to create dynamic preview environments:
When a PR is opened:
  1. GitHub provider syncs it as a resource
  2. Environment selector matches the PR
  3. Deployments can target the PR environment
  4. When PR is closed/merged, resource is removed

Running Continuously

GitHub Actions

Kubernetes Deployment

Best Practices

Sync on PR Events

Trigger sync immediately when PRs change:

Label for Targeting

Use PR labels for more specific targeting:

Next Steps

GitHub Actions Job Agent

Deploy to PRs with GitHub Actions

Dynamic Environments

Learn about dynamic environments