Which definition of a workflow triggers a workflow? #26942
-
Which definition of a workflow triggers a workflow? Let me define a workflow in my master branch to upload an artifact with every push to the master branch. Now let me rebase all 100 branches in my repository on my master branch. Now I have 101 branches in my repository that contain the definition of a workflow that uploads an artifact with every push to master. Am I now in the situation where a single push to master uploads 101 artifacts (each copy of the workflow in each branch is triggered to upload an artifact)? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
TL;DR: If you specified master in your trigger, you won’t be in this situation even when rebasing+pushing all your branches. If you defined you workflow trigger like this, only the workflow defined on master will be triggered, after any push on master ( and master only ). e.g.: when merging a branch into master.
If you defined you workflow trigger like this, the workflow defined on the branch that was just pushed to will be triggered:
The only way to trigger every workflows of every branches, in this last example, would be to push on all branches at the same time, e.g.: after rebasing all branches on master and pushing them all. It will not be the case if you defined it like in the first example. |
Beta Was this translation helpful? Give feedback.
TL;DR: If you specified master in your trigger, you won’t be in this situation even when rebasing+pushing all your branches.
If you defined you workflow trigger like this, only the workflow defined on master will be triggered, after any push on master ( and master only ). e.g.: when merging a branch into master.
If you defined you workflow trigger like this, the workflow defined on the branch that was just pushed to will be triggered:
The only way to trigger every workflows of every branches, in this last example, would be to push on all branches at the same time, e.g.: after rebasing all branches on master and pushing them all. It will not be the case …