Learn how to integrate GitHub Actions in DevOps Intelligence to enable insights into your Build and Deploy workflows.
GitHub Actions enables the automation of tasks and processes in their Build and Deploy workflows, providing insights into these phases of the DevOps lifecycle. Developers can define custom workflows using YAML syntax, which can be triggered by events such as code pushes, pull requests, or scheduled intervals. DevOps Intelligence captures all workflows in Github Actions and retrieves them.
This data is then processed and displayed in the form of graphs and tables on the Build and Deploy pages.
Integration of GitHub Actions in DevOps Intelligence
DevOps Intelligence pulls data from GitHub Actions such as Build and Deploy details, including its unique identifier, status, time stamp, duration, and cause. The process for onboarding GitHub actions comprises the following steps, each of which is a multistep procedure:
Crate a Personal Access Token.
Create a connection.
Configure the application for two supported DevOps phases:
Build
Deploy
Onboard the GitHub Actions technical service.
Create A Personal Access Token
Use the following procedure to create a Personal Access Token:
Navigate to your GitHub homepage.
Go to
User settings
→
Developer settings
→
Personal Access Tokens
→
Generate new token
.
Ensure the token has read permissions on the org/repo intended to sync.
Create a Connection
To pull data from GitHub Actions, you must establish a connection between DevOps Intelligence and GitHub Actions. Use the following procedure:
Click on Settings
→
Service IAM
→
Connections
→
Add New
→
Add connection
.
Complete the form:
For Content Provider, select GitHub.
For Name, enter local account name for reference.
For Name, enter local account name for reference.
For Host Git API, enter the URL of the Git Host (e.g., https://github.test.net).
For User, Populate this field with the same username that you use for your GitHub account.
For User, Populate this field with the same username that you use for your GitHub account.
For User, Populate this field with the same username that you use for your GitHub account.
For Token, use the PAT token created in Create Token step.
If you are using a Proxy Adapter to access DevOps Intelligence through an intermediary layer, Enter the UUID for the adapter in the Proxy ID field.
When Archive is enabled, the connection is archived for future use.
Configuring DevOps for GitHub Actions, recent customers
The procedures in this section are valid only for customers onboarded 6 June, 2024 or after. Procedures for legacy customers are provided in the subsequent section Configure DevOps Intelligence for GitHub, legacy customers.
DevOps Intelligence supports GitHub Actions for two DevOps phases:
Build
Deploy
Build
Use the following procedure to configure GitHub Actions for the Build phase:
Click on Settings & Utilities
→
Application Configuration
.
Navigate to the
Add Tools
step.
Select the phase as
Build
.
Press
Add Tool Configuration
.
For
Tool engine
, select
GitHub Actions
.
Complete the form for both tabs (Refer to
Note
directly following this list:
Workflow Jobs
Status
Click
Add Configuration
.
Enable
Workflow Jobs
to builds from all workflow jobs irrespective of workflow job name.
Enable
Workflow Job Names
to enable job names for which build data is needed.
The
Status
data from the source is mapped to the specific categories as
Passed
,
Failed
and
In Progress
.
Deploy
Use the following procedure to configure GitHub Actions for the Build phase:
Click on Settings & Utilities
→
Application Configuration
.
Navigate to the
Add Tools
step.
Select the phase as
Deploy
.
Press
Add Tool Configuration
.
For
Tool engine
, select
GitHub Actions
.
Complete the form for the three tabs (Refer to
Note
directly following this list:
Release and Environment
Status
Incident mapping
Click
Add Configuration
.
For
Release and Environment
:
Release Prefix signifies the starting sequence of characters for releases, with the default value being empty.
Release Variable signifies the starting sequence of characters for releases, with the default value being empty.
Environment Prefix signifies the starting sequence of characters for environment, with the default value being empty.
Environment Name environment name where your application is deployed.
Environment Field signifies the field from where environment name has to be picked from. Ex: env
Release Field signifies the field from where incident release name has to be picked from. Ex: env
Map your production environment signifies the environment used for production deployments.
The tool configuration inherits the release prefix, variable & Environment prefix, name from the application. To override these values only for this configuration, click the Edit button and make the necessary changes. Please note that changing the values here will not impact the release prefix and variable set in the application.
The
Status
data from the source is mapped to the specific categories as
Passed
,
Failed
and
In Progress
.
For
Incident Mapping
, the Host URL of Incident management tool used to monitor incidents if any arising out of application deployment issues. Ex. ServiceNow
Onboard the GitHub Actions technical service
You must now onboard the technical service. Use the following procedure:
Navigate to DevOps Intelligence →
Settings & Utilities
→
Application Configurations
.
Click the overflow menu for the chosen application and click on
Onboard Technical Service
.
Select the phase for which you want to configure
GitHub Actions
. The page displays only the phases for which this tools has been configured for the application.
Select the tool engine as
GitHub Actions
.
For
Connection
: Select the appropriate connection name from the drop down.
Select
Provider
only in the Deploy phase for the current deployment.
DevOps Intelligence supports the following types of GitHub tracking:
Organization
Repository
Organization Tracking
To track Organizational data, use the following procedure:
Select Tracking Type
Organization
.
Select the appropriate organization.
Click
Onboard
to onboard the technical service.
Repository Tracking
To track Organizational data, use the following procedure:
Select Tracking Type -
Organization
and
Repository
.
Select the appropriate organization.
Select the appropriate repository.
Click
Onboard
to onboard the technical service.
For GitHub Enterprise accounts, if the administrator has set a limit on API calls, Devops Intelligence will optimize its process of fetching data and will execute approximately 1000 calls each hour. This is to make sure no other task using the credentials are hampered. Once the limit is exceeded DevOps Intelligence display a message on the GitHub
sync
page.
Deleting the GitHub Actions technical service
The administrator may, at will, delete the GitHub technical service. Use the following procedure:
Navigate to DevOps Intelligence →
Settings & Utilities
→
Application Configurations.
Expand the application to see all the associated phases.
Click the Overflow menu associated with the phase (
Build
or
Deploy
).
Click
Delete Technical Service
. The service responds by displaying a form.
Completed the form.
For Tool engine, select GitHub Actions.
Select the appropriate Organization.
Select the appropriate repository.
Click
Delete
at the bottom of the form.
Configuring DevOps Intelligence for GitHub Actions, legacy customers
The procedures in this section are valid only for customers onboarded before 6 June, 2024.
Use the following procedure to configure DevOps Intelligence for SonarQube:
Navigate to
DevOps Intelligence
→
Settings & Utilities
→
Tools Configuration
→
Add Configuration
.
Select GitHub Actions as the
Tool Engine
.
Under
Connection
, select the appropriate connection name.
Select the project and metrics you want to track in DevOps Intelligence.
Additional configurations are provided to manage the status, including