-
Notifications
You must be signed in to change notification settings - Fork 0
GitHub
Dave Cox edited this page Dec 4, 2025
·
2 revisions
To create a new workflow, it is not sufficient to push a commit with a new yaml file in .github/workflows. The workflow/file must be registered into the repo somehow, first.
- Create the file in the Actions web UI, either committing to the default branch or create a new branch and PR. Apparently you don't have to get the PR pulled, or even complete creation of the PR. Just creating the branch with the file through the web UI registers the workflow. Then you can commit changes to the workflow file on other branches.
- Apparently a manually-triggered workflow (with
on:workflow_dispatch:) must be merged to the default branch before the GitHub web UI will offer the UI elements to trigger it manually (but apparently after that it will let you trigger on different branches, with their workflow-file content in effect). - You can use the GitHub CLI to trigger workflows on-demand on other branches, when the file with
workflow_dispatch:has not yet been merged to the default branch.
gh workflow run workflow-name --ref $(git branch --show-current) -f myparameter=myvalue