GitHub Bot
Connect your GitHub organization to your workspace to enable powerful features like GitHub Job Agent, Release Scanner, and Deployment Configuration.
Creating a Github bot allows you to enable several powerful features, including
- Github Actions Dispatcher
- Release Scanner
Creating a Github App
On Github, create a new Github App
To set this up, navigate to github.com and register a new GitHub App.
- Your GitHub account: https://github.com/settings/apps/new
- Your GitHub organization:
https://github.com/organizations/<your-org>/settings/apps/new
Configure the Github App
Fill out the form as follows:
Field | Value |
---|---|
Github App Name | ctrlplane-{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.
Copy the Client Secret
Copy or note down the client secret, as it will be used to configure the Github App.
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:
The name of the Github App
The private key of the Github App
The ID of the Github App, can be found in the “about” section of the Github App.
The client ID of the Github App, can be found in the “about” section of the Github App.
The client secret of the Github App
The private key of the Github App, can be copied from the downloaded file (e.g
-----BEGIN RSA PRIVATE KEY-----...
).
The webhook secret of the Github App