Remote Trigger in GitHub Actions
You can use a webhook event called repository_dispatch to remotely trigger the workflow from any external applications in GitHub Actions. Please refer Repository Dispatch Event for more information.
A repository dispatch is an HTTP request to your repository asking GitHub to trigger the workflow remotely.
Steps to Trigger Remote Workflows in GitHub Actions
Step 1: Generate a new token.
Click on the Avatar > Settings > Developer Settings > Personal access tokens.
Click Generate new token.
In the Note field, provide the token name. In Select scopes, select the check box for the scope as per the requirement. Click Generate Token. This will generate an authentication token. Copy it.
Step 2: Add a trigger for the “On” key.
You need to add a trigger for the “On” key so that the workflow will accept repository dispatches. Mention specific event types that will trigger the workflow.
You must POST the request to https://api.github.com/repos/:owner/:repo/dispatches to trigger workflows to accept the dispatch. The payload of a repository dispatch is given below.
{ "event_type": "my_event_type" } Accept: application/vnd.github.everest-preview+json Content-Type: application/json Authorization: Bearer {{personal_access_token}}
Steps on How to Trigger the Remote Workflow using Provar
1. Create a Rest Web Service Connection.
2. Create a test case with the above connection and drag and drop the Web Request(REST) method from the Test Palette to the test case.
3. Configure the Resource URL, Request Header, Method, Body Style, and Body as given below.
4. Give a bearer token, the personal access token generated in the repository.
Step 3: See the workflow remote trigger in GitHub.
Run the test case. You will get a 204 No Content Response. You can see the workflow triggered under actions.
- Provar Automation
- Installing Provar Automation
- Updating Provar Automation
- Using Provar Automation
- API Testing
- Behavior-Driven Development
- Creating and Importing Projects
- Creating Test Cases
- Custom Table Mapping
- Functions
- Debugging Tests
- Defining a Namespace Prefix on a Connection
- Defining Proxy Settings
- Environment Management
- Exporting Test Cases into a PDF
- Exporting Test Projects
- Override Auto-Retry for Test Step
- Managing Test Steps
- Namespace Org Testing
- NitroX
- Provar Desktop
- Provar Test Builder
- Refresh and Recompile
- Reintroduction of CLI License Check
- Reload Org Cache
- Reporting
- Running Tests
- Searching Provar with Find Usages
- Secrets Management and Encryption
- Setup and Teardown Test Cases
- Tags and Service Level Agreements (SLAs)
- Test Cycles
- Test Plans
- Testing Browser Options
- Tooltip Testing
- Using the Test Palette
- Using Custom APIs
- Callable Tests
- Data-Driven Testing
- Page Objects
- Block Locator Strategies
- Introduction to XPaths
- Creating an XPath
- JavaScript Locator Support
- Label Locator Strategies
- Maintaining Page Objects
- Mapping Non-Salesforce fields
- Page Object Operations
- ProvarX™
- Refresh and Reselect Field Locators in Test Builder
- Using Java Method Annotations for Custom Objects
- Applications Testing
- Provar Manager
- DevOps
- Introduction to Test Scheduling
- Apache Ant
- Configuration for Sending Emails via the Automation Command Line Interface
- Continuous Integration
- AutoRABIT Salesforce DevOps in Provar Test
- Azure DevOps
- Running a Provar CI Task in Azure DevOps Pipelines
- Configuring the Automation secrets password in Microsoft Azure Pipelines
- Parallel Execution in Microsoft Azure Pipelines using Multiple build.xml Files
- Parallel Execution in Microsoft Azure Pipelines using Targets
- Parallel execution in Microsoft Azure Pipelines using Test Plans
- Bitbucket Pipelines
- CircleCI
- Copado
- Docker
- Flosum
- Gearset DevOps CI/CD
- GitHub Actions
- Integrating GitHub Actions CI to Run Automation CI Task
- Remote Trigger in GitHub Actions
- Parameterization using Environment Variables in GitHub Actions
- Parallel Execution in GitHub Actions using Multiple build.xml Files
- Parallel Execution in GitHub Actions using Targets
- Parallel Execution in GitHub Actions using Test Plan
- Parallel Execution in GitHub Actions using Job Matrix
- GitLab Continuous Integration
- Travis CI
- Jenkins
- Execution Environment Security Configuration
- Provar Jenkins Plugin
- Parallel Execution
- Running Provar on Linux
- Reporting
- Salesforce DX
- Git
- Team Foundation Server
- Version Control
- Salesforce Testing
- Best Practices
- Troubleshooting
- Release Notes