Faisal Shani
Faisal Shani

Reputation: 820

How to create github workflow on a non-main branch

I am just trying to create a github workflow for cicd on a non-main branch. But everytime I click on "Create New Workflow" it be defaults shows me the "main" without any option to save it. enter image description here

I tried adding the name of the branch where on which I need to enable this workflow but when I click on start commit then it still shows me that it will be saved inside the main branch. Any idea how can I enable workflow in a non-main branch?

Upvotes: 0

Views: 507

Answers (1)

Preston Martin
Preston Martin

Reputation: 2963

You are editing the main.yml file from the main branch, but once you select start commit

start commit

at the bottom of the page, you are asked if you want to create a new branch and submit a pull request.

enter image description here

Upvotes: 1

Related Questions