---
title: "Manually trigger workflow from non-main branch"
url: https://daily.dev/posts/manually-trigger-workflow-from-non-main-branch-ovru8y6w4
source_url: https://www.damirscorner.com/blog/posts/20260703-ManuallyTriggerWorkflowFromNonMainBranch.html
type: article
source: "Damir's Corner"
published: 2026-07-03T07:19:21.487Z
updated: 2026-07-03T07:19:39.045Z
tags: ["github", "cicd", "github-actions"]
reading_time: 2
upvotes: 3
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Manually trigger workflow from non-main branch

**[Damir's Corner](https://daily.dev/sources/damirscorner)** · 2 min read · 3 upvotes · 0 comments

## Summary

When adding a workflow_dispatch trigger to a GitHub Actions workflow on a feature branch, the 'Run workflow' button won't appear in the GitHub UI because it only shows when the trigger exists on the main branch. A workaround is to trigger the workflow manually using GitHub CLI with `gh workflow run`, specifying the workflow file, the target branch via --ref, and any input values. This approach is arguably more convenient than the web UI even when the button is available.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.damirscorner.com/blog/posts/20260703-ManuallyTriggerWorkflowFromNonMainBranch.html>

## Similar posts on daily.dev

- [Bot-created pull requests can run workflows if approved](https://daily.dev/posts/bot-created-pull-requests-can-run-workflows-if-approved-q7ziyqzrc) · GitHub Changelog · 0 upvotes · 0 comments

---

Tags: [#github](https://daily.dev/tags/github), [#cicd](https://daily.dev/tags/cicd), [#github-actions](https://daily.dev/tags/github-actions)

[View this post on daily.dev](https://daily.dev/posts/manually-trigger-workflow-from-non-main-branch-ovru8y6w4)
