split action build logic into _build_action