Action on newly created branch #26987
-
We delete our QA branch, and recreate it from develop every week. We currently use:
But this does not run when we delete the branch and then push a new one back up.
Is there anyway I can get QA to build when we re-create it? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
I tested with the following steps in my repository ( myOrg/myRepo ):
2) Executed the command “git clone https://github.com/myOrg/myRepo.git” on my local machine to clone the repository from the remote to the local. 3) Executed below commands to generate the Dev branch on the local based on the master branch, then pushed it from local to remote.
4) Checked on the web page of the remote repository, I can see the Dev branch was pushed to the remote successfully, and the workflow CI-Dev was triggered to run. 5) Then, like as you posted, executed below commands on the local to delete the Dev branch from the remote, and re-push the Dev branch from local to remote.
6) Checked on the web page of the remote repository, the Dev branch was re-pushed to the remote successfully, and the workflow CI-Dev also was triggered again to run. 7) If I added paths filter for the push event in the workflow, step 3) and step 5) no longer trigger the workflow:
Have you set paths filter for the push event in your workflow? If the problem still exists, please share your repository with us, so that we can check more detailed configurations in your workflow to analyze the root cause. |
Beta Was this translation helpful? Give feedback.
-
yes thats right, we do have a paths filter on there!
We have frontend and backend folders in the repo which we watch for changes. Now you’ve mentioned it, I can understand why that might cause an issue. What’s your advice for that? |
Beta Was this translation helpful? Give feedback.
-
You can try to add the Create event in your workflow:
The Create event will trigger the workflow to run on the created branch. P** ath filters are not evaluated for Create event**. About why the p** ath filters** will prevent the workflow from being triggered when create a new branch, I have reported this question to the appropriate engineering team for further investigation and evaluation. If they have any progress, I will notify you in time, and sometimes the appropriate engineers may directly reply you here. |
Beta Was this translation helpful? Give feedback.
-
You can use
Side note: it works for me. |
Beta Was this translation helpful? Give feedback.
-
Thanks I removed the path filters for now and it operates as expected 👍 |
Beta Was this translation helpful? Give feedback.
@outrunthewolf ,
You can try to add the Create event in your workflow:
The Create event will trigger the workflow to run on the created branch. P** ath filters are not evaluated for Create event**.
About why the p** ath filters** will prevent the workflow from being triggered when create a new branch, I have reported this question to the appropriate engineering team for further investigation and evaluation. If they have any progress, I will notify you in time, and sometimes the appropriate engineers may directly reply you here.