Add OS-specific exclude patterns of the branch names for the CI (cherry picked from commit f88b8946f3da988f7aa80e36681037b4f474840e)