H1B - Temporary work?

I’m on H1B, looking for a new job since I just got laid off. One opportunity involves temporary full time work for 6 months. Is that allowed? Or does it need to be a permanent position?

Thanks.

Charles