Set up GitHub for Workflows
Latest Dynatrace
Your Dynatrace environment can integrate with GitHub repositories using GitHub for Workflows . After this setup, you can start using GitHub for Workflows actions in your workflow to manage issues and pull requests automatically based on your monitoring data and events.
Prerequisite
You need the app-engine:apps:install
permission.
Steps
Install GitHub for Workflows
Allow GitHub in outbound connections
Grant permissions to Workflows
Authorize connection to GitHub
Install GitHub for Workflows
To use GitHub workflow actions, you need to install GitHub for Workflows from Dynatrace Hub.
- In Dynatrace Hub , select GitHub for Workflows.
- Select Install.
Add a host to the Allow-list in Limit outbound connections
By adding the GitHub host called api.github.com
to the Allow-list in Limit outbound connections, you can granularly control the web services connected to your Dynatrace environment.
To set up the connection between GitHub and your Dynatrace environment
- Go to Settings and select Connections > Outbound and inbound > Limit outbound connections. This opens the Settings Classic page.
- Select Add item and add
api.github.com
. - Select Save changes.
Grant permissions to Workflows
Aside from permissions required by Workflows to run actions on your behalf, there are additional permissions required to use GitHub for Workflows actions.
To fine-tune permissions granted to Workflows
- Go to Workflows and select Settings > Authorization settings.
- Select the following permissions besides the general Workflows permission.
app-settings:objects:read
For more information on general Workflows user permissions, see User permissions for workflows.
Authorize connection to GitHub
You need to configure connections for each of your GitHub environments.
To configure a connection
-
Create a personal access token for your GitHub account as described in Managing your personal access tokens. We only support cloud-based GitHub plans such as GitHub Enterprise Cloud. GitHub Enterprise Server plans aren't supported.
-
Go to Settings and select Connections > Connectors > GitHub.
-
Select Connection.
-
Define your GitHub connection.
- Connection name: Provide a meaningful and unique name for your connection.
- GitHub Type: Select the type of authorization mechanism.
- GitHub token: Provide your GitHub API token.
-
Select Create.
We strongly recommend that you limit the permissions of your personal access tokens to the necessary minimum. For more information, see Managing your personal access tokens for information about limiting the access to a certain repository or permissions/scopes. This ensures that your personal access token can be used for accessing and changing only the permitted repositories.