There is nothing to prevent a character from casting Witch Bolt on a target that the character has grappled.
Grappling places the target in the grappled condition which reduces their movement to zero. It only takes one hand free per Page 74 of the 5e Basic Player Rules.
Using at least one free hand, you try to seize the target by making a
grapple check,...
Allowing you to cast Witch Bolt with the other free hand due to the rule on Somatic spell components on page 205 of the PHB
Spellcasting gestures might include a forceful gesticulation or an
intricate set of gestures. If a spell requires a somatic component,
the caster must have free use of at least one hand to perform these
gestures.
However the target of the grapple is free to attack the person who is grappling him. Which will cause concentration checks if damage is done to the caster.
Also as a house rule, a referee may decide that because Witch Bolt is a lightning effect and since the caster is grappling the target, that the caster is subject to the effects of the spell due to how electricity and lightning works in the real world. Again this is not in the RAW rules, it would be a house rule. I am mention because in my experience it is common for referee apply what they know of real life to various rulings even in a fantasy game like D&D.
While it is useful in that it prevent the target from moving beyond the 30 foot range of the spell, the fact the target can still attack means that it is likely that concentration checks will ensue. If failed it negates the point of casting the Witch Bolt in the first place. Combined with the disadvantaged ranged spell attack roll makes this a marginal tactic in my opinion.
You said it yourself, witch bolt "ends if you use your action to do anything else". Using your bonus action isn't using your action.
In 5e, it's just "action" not "standard" action, and as you also said "movement" actions aren't a thing. PH 189 says that "On your turn, you can move a distance up to your speed and take one action."
If you spend that one action doing not-witch bolt, the spell ends. Anything else you do with your move, bonus action, or reaction are immaterial—unless those actions violate one of the restrictions of the spell you already listed (like using your bonus action to misty step out of line of sight).
Best Answer
Yes, the warlock can keep the witch bolt's effect on them without making a saving throw.
Sanctuary only has an effect when the warded creature is attacked or targeted, but witch bolt only targets them once — in this scenario, that's before sanctuary was active. The automatic damage does take an action subsequently, but that action is neither an attack, nor calls for actively re-targeting. (If targeting were involved, witch bolt could switch targets for its later damage — but notice that it can't be re-targeted, so no targeting is involved for the automatic damage.)
Therefore the already-targeted creature does not need to be re-targeted or attacked by the caster of witch bolt to deal the automatic damage, and sanctuary won't impose a saving throw.