Fix issue with jobs not running with protected templates
There was a bug in the previous implementation due to always using the unprotected template to run jobs even on protected branches.
There was a bug in the previous implementation due to always using the unprotected template to run jobs even on protected branches.