It depends on the type of bankruptcy you file. Chapter 13 no, Chapter 7 yes in most cases. The exceptions usually are charges you made 6-months prior to filing may be held against you if the creditor can prove you ran the card up on purpose with no intent of ever paying.
There are different types of bankruptcy. I assume you are referring to Chapter 7 bankruptcy, in which case you will not have to pay your credit card bills, or any other debts you may have accumulated. There are two usual exceptions to that: Student loan and taxes. However, when you declare bankruptcy, all your assets (again, with a few exceptions, depending on what state you file in) can be taken or sold to pay off some of your debts, and your credit will be ruined. Also, please note that you may still have to pay recent purchases on your credit cards, and be careful not to appear as if you intentionally made credit card purchases before filing for bankruptcy. Do consult a BK attorney in your area.