GitHub API Integration
Adding a GitHub API integration allows you to use the GitHub CLI in your pipelines.
The integration uses the GitHub personal access token. Buddy lets you add multiple integrations using different personal access tokens, which allows you to run GitHub CLI commands as different users.
Setting up the integration
- Go to your pipeline and add the GitHub CLI action from the DevOps category.
- Open the dropdown menu and click Add new integration.
Adding an integration
- Click Set up a new GitHub API integration.
- Click the Get token button to open a new tab and create a personal access token in GitHub.
"Get token" button
- In GitHub, create a personal access token with the scopes you need to run the operations you want to add to your workflow.
Buddy doesn't require any specific scopes to make the integration work, so choose exactly what you need.
- After creating the token, copy it and return to Buddy to finish the configuration. Enter your GitHub username and paste the token into the corresponding fields. Click Add a new integration to continue.
Working with multiple integrations
You can add multiple integrations to run GitHub CLI as different users. To add a new integration, use the dropdown menu in the top left part of the action's terminal view:
Adding more integrations
When you add multiple integrations, you can switch between them using the same dropdown menu:
Switching between integrations
Choosing the integration works on a per-action basis. This means that you can run different GitHub CLI actions as different users within the same pipeline.
Last modified on January 11, 2022