split build_gkey action to kill complexity