GitHub Actions

Prerequisite

  • The yml file should have been created in the main branch in GitHub.

Generate Personal Authentication Token

Follow the steps mentioned below to generate a token in GitHub.

1. Log into GitHub.

2. Go to User Profile > Settings.

3. Click on the Developer Settings on the navigation bar at the left.

4. Click on Tokens (classic).

5. Click on the Generate new token button.

Define the Scopes to grant access to personal tokens, then generate the token.

Construct the URL

The following is an example of constructing the URL to trigger a build in GitHub.

https://api.github.com/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches

Here, the placeholder's values are as below.

owner=Lizamathew

repo=parameter

workflow_id= 54649623

Hence, the URL to trigger the build would be -

https://api.github.com/repos/Llizamathew/parameter/actions/workflows/54649623/dispatches

CI/CD Rule Configuration in QTM4J

The following are examples of triggering the build without parameters and with query parameters.

CI/CD Rule Without Query Parameters

CI/CD Rule With JSON Parameters