GitHub Actions

Note

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

Generate Personal Authentication Token

Perform the following steps to generate a token in GitHub:

  1. Log into GitHub.

  2. Go to User Profile and select Settings.

  3. Click the Developer Settings on the navigation bar.

  4. Click Tokens (classic).

  5. Click Generate new token.

    GitHub Actions Generate New Token

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

    GitHub Actions Define Scopes

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

GitHub Actions Rule Without Query Parameters

CI/CD Rule With JSON Parameters

GitHub Actions Rule With JSON Parameters
Publication date: