If you accuse someone of moving the goalposts, you mean that they have changed the rules in a situation or an activity, in order to gain an advantage for themselves and to make things difficult for other people.
[disapproval] They seem to move the goal posts every time I meet the conditions which are required.