Earlier this week, GitHub announced a new feature which allows developers to trigger workflows manually from within the “Actions” tab.

This has been one of the most heavily requested features for some time now, with the official support thread attracting hundreds of upvotes over the last 12 months — so does it deliver all that’s been promised?

The short answer is yes, but not without a few pitfalls. Let’s dive in.

Option 1: Basic Setup

To create your first manual workflow, you’ll want to use the new workflow_dispatch trigger:

A very simple manual workflow trigger.

Once you add this file to your repository, you’ll be able to see and manually run the workflow from the “Actions” tab on GitHub:

First select “Actions”, then “My First Manual Workflow”, then “Run workflow” followed by the “Run workflow” button.

You’ll also notice that you can customise the branch to run your manual workflow against, however be advised that at least some variation of the workflow file must be on your default branch (e.g master) for it to appear in the “Actions” tab.

Selecting a custom branch will:

  • Checkout the latest commit from that branch.
  • Use the branch’s own variation of the workflow file (if modified).

#continuous-integration #continuous-deployment #github-actions #continuous-delivery #github

How to Manually Trigger a GitHub Actions Workflow
29.10 GEEK