dig your own grave
US /dɪɡ jʊər oʊn ɡreɪv/
UK /dɪɡ jʊər oʊn ɡreɪv/

1.
to do something that will cause you problems or failure in the future
:
•
If you keep lying to your boss, you're just going to dig your own grave.
•
By refusing to compromise, the politician was digging his own grave with the voters.