[SIGMON-572] add protected conditions on the ci steps
Context
- The pipeline is failing when the branch is not protected
What was done
- Add conditional statement for steps that require the branch to be protected
TODO
- /
QA
- code was not unit tested, because it's a pipeline
- acceptance tests were written
Review objectives
- ? assessment of code functionality