Nope. Thirsting Blade requires taking the Attack action. Casting a spell uses the Cast A Spell action.
This is correct but not specific. Specifically Thristing blade makes it to where taking the Attack action grants you the ability to make two attacks instead of one, which is why it doesn't work; Green Flame Blade is casting a spell as noted above, and as part of that spell you make an attack...it isn't using the Attack action nor is it telling you to use the attack action as part of casting the spell.
As for which is better, it depends on a few factors. If your weapon does 1d8 or more damage and/or you don't usually fight enemies in tight groups, thirsting blade will probably be better for levels 5-10.
I think it's akin to ek with war magic who can take two attacks at potentially 2d6+ str (let's say 18 strength for +4) for a potential of 4d6+8 with extra attack (average of 22) or 2d6+ 1d8 + 4 on your target plus a potential of 1d8+ int (lets say 16 for +3) on a creature within 5 ft or an average of 15.5 on the first creature with 7.5 on the second creature (23 total). Are there two targets within 5 ft? Yes? It's close enough you can go either way. Does either have fire resistance? Go extra attack. Does one have high AC while the other doesn't? Green flame blade targeting the low AC creature. Does one have slashing (or whatever the weapon damage) resistance but the other doesn't? Greenflame blade the non resistant creature. Don't need 15.5 damage on either creature but the 11 will kill both? Extra attack. Change though stats to warlock stats and extra attack to thirsting blade, particularly if hexblade, and the story is much the same, it depends on the situation. Having options is never a bad idea.