<human>: Can you condense the text into a few key points?

Ok so this is kind of a first time thing for me. I have known my friend for 4 years and we got along fairly well for most of that time. We used to be roommates in college as well. There were a couple times where we were not talking with each other, and I am not sure if it is related. A couple months ago I got a new job and I was working with my friend. After a while, he suggests we get an apartment since he is looking for a place. I tell him ahead of time that it can't be a year long commitment. He finds a place that only has a year lease and I told him no. He flipped and we didn't talk for about a week. He came back and apologized eventually, but it didn't feel super genuine. This is when I sensed a change in the relationship.

Since that time, he has developed this habit of doing things to annoy me to get a rise out of it. I try to not let it get to me, but you can only take so much. In the past few weeks there has been this girl that I am interested in at my workplace. He noted that I had been talking with her and visiting her office, so now he always goes to her office as well. One day I swung by her office and he was in there and they were definitely flirting. My philosophy has always been "you snooze, you lose" when it comes to asking women out, but there is a detail that should be noted. My friend has been in a 5 year relationship with the same girl since high school.

I can't help but feel that he is flirting with this girl to annoy me. The girl is unaware that he is in a relationship as well. I feel like I should confront him about it, but maybe it's not a big deal. I guess I just need some outside advice or maybe a different perspective.
<bot>: Friend of a few years likes to annoy me. He knows I like a girl and he flirts with her when I'm not around. What should I do?