Integration with GitHub can be done using an app or personal access token. Using an app allows more fine-grained access control. Using an app is easier with the setup wizard.
- Open the URL in
github.setup.url
fromstatus.json
- Choose whether you're integrating with GitHub.com or GitHub Enterprise Server
- Next choose New GitHub App
- If you want to create an app for your personal repositories, choose User app
- If you want to create an app for your organization:
- Choose Organization app
- Type in the organization slug (ORGANIZATION from https://github.com/ORGANIZATION/REPO)
- Choose registration level for the runners
- Click Create GitHub App to take you to GitHub to finish the setup
- Follow the instructions on GitHub
- When brought back to the setup wizard, click the install link
- Install the new app on your desired repositories
- Decide if you want to create a personal app or an organization app
- For a personal app use https://github.com/settings/apps/new
- For an organization app use https://github.com/organizations/MY_ORG/settings/apps/new after replacing
MY_ORG
with your GitHub organization name
- Choose a name and homepage URL (the app won't be public, so they don't matter too much)
- Setup webhook under the webhook section
- For Webhook URL use the value of
github.webhook.url
fromstatus.json
- Open the URL in
github.webhook.secretUrl
fromstatus.json
, retrieve the secret value, and use it for webhook secret
- For Webhook URL use the value of
- In the permissions section enable:
- Repository -> Actions: Read and write
- Repository -> Administration: Read and write
- Repository -> Deployments: Read-only
- Repository -> Administration: Read and write (only for repository level runners)
- Organization -> Self-hosted runners: Read and write (only for organization level runners)
- In the event subscription section enable:
- Workflow job
- Under "Where can this GitHub App be installed?" select "Only on this account"
- Click the Create button
- From the new app page generate a private key and save the downloaded key
- On the top left go to Install App page and install the app on the desired account or organization
- Open the URL in
github.auth.secretUrl
fromstatus.json
and edit the secret value- If you're using a self-hosted GitHub instance, put its domain in
domain
(e.g.github.mycompany.com
) - Put the new application id in
appId
(e.g.34789562
) - If using organization level registration, add
runnerLevel
withorg
as the value - Ignore/delete
dummy
and leavepersonalAuthToken
empty
- If you're using a self-hosted GitHub instance, put its domain in
- Open the URL in
github.auth.privateKeySecretUrl
fromstatus.json
and edit the secret value- Open the downloaded private key with any text editor
- Copy the text from the private key as-is into the secret
- Go to https://github.com/settings/tokens/new
- Choose your expiration date (you will need to replace the token if it expires)
- Under scopes select
repo
- Copy the generated token
- Open the URL in
github.setup.url
fromstatus.json
- Choose whether you're integrating with GitHub.com or GitHub Enterprise Server
- Next choose Personal Access Token
- Enter your personal access token
- Click the Setup button
- Open the URL in
github.auth.secretUrl
fromstatus.json
and edit the secret value - If you're using a self-hosted GitHub instance, put its domain in
domain
(e.g.github.mycompany.com
) - Put the generated token in
personalAuthToken
(notpersonalAccessToken
) - Ignore all other values
- For organizations go to https://github.com/organizations/MY_ORG/settings/hooks after replacing
MY_ORG
with your GitHub organization name - For enterprise go to https://github.com/enterprises/MY_ENTERPRISE/settings/hooks after replacing
MY_ENTERPRISE
with your GitHub enterprise name - Otherwise, you can create one per repository in your repository settings under Webhooks
- Configure the webhook:
- For Webhook URL use the value of
github.webhook.url
fromstatus.json
- Open the URL in
github.webhook.secretUrl
fromstatus.json
, retrieve the secret value, and use it for webhook secret - Make sure content type is set to JSON
- Select individual jobs and select only Workflow jobs
- For Webhook URL use the value of
If the setup wizard tells you setup has already been completed or if github.setup.status
is completed, or if github.setup.url
is empty:
- Open the URL in
github.setup.secretUrl
fromstatus.json
- Edit the secret
- Put a new random value in
token
- Run status function again to get the new URL