1.56.0: Get the default branch from env vars also allow to overwrite as parameter
This is a feature from a hotfix where we add the option to specify a default branch from parameters else we capture the default branch from the runner$GITHUB_BASE_REF
var