No, you can't get fired for participating in a class-action lawsuit against your employer. The law protects you against retaliation by your employer if you participate in a class action against your employer.