global:
  integrations:
    github:
      url: https://ctrlplane.example.com
      bot:
        appName: ctrlplane-bot
        appId: 1234567890
        clientId: 1234567890
        clientSecret: 1234567890
        privateKey: `-----BEGIN RSA PRIVATE KEY-----...`
        webhookSecret: '....'

Creating a Github bot allows you to enable several powerful features, including

  • Github Actions Dispatcher
  • Release Scanner

Creating a Github App

1

On Github, create a new Github App

To set this up, navigate to github.com and register a new GitHub App.

2

Configure the Github App

Fill out the form as follows:

FieldValue
Github App Namectrlplane-{your-instance-name}
Homepage URL<your-instance-url>
Webhook URL<your-instance-url>/api/github/webhook

Configure the permissions as follows:

  • Repository
    • Actions: Read and write Allows the creation of workflow runs associated with your deployments.
    • Contents: Read only Allows Ctrlplane to detect changes to your *ctrlplane.yaml configuration files. Read more about configuration management.
  • Organization
    • Members: Read only Allows you to configure github organizations across your workspaces.
  • Subscribe to Events
    • Push Subscribe to push events to sync changes to your deployment configurations.
    • Workflow run Subscribe to workflow run events to sync the status of your distpatched workflows. See Actions Dispatcher for more information.
3

Copy the Client Secret

Copy or note down the client secret, as it will be used to configure the Github App.

4

Generate a new private key

Generate a new private key, and download the file.

Configure the Github information on your instance

Add the following environment variables to your instance:

GITHUB_BOT_APP_NAME
string
required

The name of the Github App

GITHUB_BOT_PRIVATE_KEY
string
required

The private key of the Github App

GITHUB_BOT_APP_ID
string
required

The ID of the Github App, can be found in the “about” section of the Github App.

GITHUB_BOT_CLIENT_ID
string
required

The client ID of the Github App, can be found in the “about” section of the Github App.

GITHUB_BOT_CLIENT_SECRET
string
required

The client secret of the Github App

GITHUB_BOT_PRIVATE_KEY
string
required

The private key of the Github App, can be copied from the downloaded file (e.g -----BEGIN RSA PRIVATE KEY-----...).

GITHUB_BOT_WEBHOOK_SECRET
string
required

The webhook secret of the Github App

global:
  integrations:
    github:
      url: https://ctrlplane.example.com
      bot:
        appName: ctrlplane-bot
        appId: 1234567890
        clientId: 1234567890
        clientSecret: 1234567890
        privateKey: `-----BEGIN RSA PRIVATE KEY-----...`
        webhookSecret: '....'