I'm afraid I might lose my job because of my partying habits. What can I do?

Job stress. Associate with more responsible people, limit your party times to weekends, go to the gym when your tempted to party, find friends who are more into fitness and health than partying. Excess party going will cost you in more ways than one, your health, your career and your integrity can be negatively impacted. My best.
3 Choices. You have 3 choices. 1. Make no change & don't worry about the situation. You can even feel surprised when you have to face the consequences. 2. Make the determination that partying is a prior in your life. Don't change & suffer the consequences. 3. Decide that employment & be healthy is a priority. Decide to cut down on or stop partying. Save your job, your reputation, your self -respect.
Be a model employee. Employers hire people to do good work, improve the morale and personal interactions within the company, and help project a good public image for the company to the rest of the community. An employee who has activities that he worries the boss won't like, should try to be better than his coworkers in work quality, interpersonal relationships, and contributions to the company, to stay very valuable.