-
Hi, I’m sure there’s a bit of documentation I’m not finding… Must workflows ( The case I’m thinking about here is having a slightly different workflow on master and say a release-x.y branch. If I start with a workflow on master, and later edit it on the release branch, what will get used? The version on master or the version on the release branch? The way the UI is structured suggests the answer is “the version on master”, but I cannot find a piece of documentation that says this. On the same line, if I open a PR that modifes the workflow and the target branch is master, what will run? The unmodified version already on master or the modified version in the PR? If the former, how do I test that the change in the workflow is not breaking the workflow? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
No, a workflow can exist in any branch. It will be triggered as long as your conditions (the “on” block) matches. If you open a PR with a modified workflow, all workflows that are on the “pull_request” or “push” (without target branch) condition will run based on the code from that PR/push, so with the updated workflow. |
Beta Was this translation helpful? Give feedback.
-
Thanks! I was confused because in the UI on the screen listing the workflows that have run, there’s a menu on the right of each item that contains an option “view workflow file”, and that’s showing me the version from master. Double checking, I can verify that the version that actually ran is the one from the branch. |
Beta Was this translation helpful? Give feedback.
-
нет не будет, я написал рабочий процесс в ветке devops, рабочий процесс нацелен на работу с веткой тест и должен реагировать на пуш в ветку тест. Итог - он банально отсутствует в разделе actions, файл .github/workflows/devops_workflow.yml есть, а actions нет |
Beta Was this translation helpful? Give feedback.
-
But I wasn't able to run the workflow if I directly created it in a feature branch. The workflow should have existed in the main at least once in it's lifetime, for it work. |
Beta Was this translation helpful? Give feedback.
No, a workflow can exist in any branch. It will be triggered as long as your conditions (the “on” block) matches.
If you open a PR with a modified workflow, all workflows that are on the “pull_request” or “push” (without target branch) condition will run based on the code from that PR/push, so with the updated workflow.