ci code re-factored. Badge generation file still has to be re-factored