Share job execution between workflows
I have two workflows defined: snapshots build and releases build. The former is executed on PRs and pushes to master, the latter is quite similar, but executed on tags. Both workflows consist of two jobs, sharing the first one (compile_and_test):
In most cases these two workflows won't be executed at the same time, but what if someone pushes a commit which is tagged, together with the said tag? I mean, what if somebody does this:
$ git commit -m "This commit is tagged"
$ git tag the-tag
$ git push origin master --tags
The compile_and_test job is executed twice!
It would be great to add an option to start a job in a shared workflow, and then branch that workflow in other two workflows. Maybe merge after that? Maybe we could indicate when to branch (in this case if the commit is tagged).