Taxes

I sold my primary home in Nov 2020. I lived there for 19 years. I then moved into my secondary home in a different state that I owned for 8 years and lived there for 6 months until I sold that home and used the money to purchase my new, current home. 
Do I need to pay capital gains tax on that second home sale ?