All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
There is no doubt that you should not have behaved in such a manner, which disgraces the school in which you are studying and getting educational benefits from it. This act does not please the school’s owners and people in charge. Even you, you do not accept to do this in your own home. What a person does not accept for himself, should not accept it for others, as stated in the Hadith on the authority of Anas who narrated that the Prophet, sallallahu ‘alayhi wa sallam, said: “None of you is a real believer until he loves for his brother what he loves for himself.” [Al-Bukhari and Muslim]
The scholars said: “It means that he should dislike for his brother what he dislikes for himself.”
You did well when you held yourself accountable for what you had done, and when you felt regret for that; may Allah reward you.
If it is possible to inform the school management about it without any harm on you by informing them, then it is better. But if you believe that harm might be incurred to you, then there is no harm in not informing them because such conduct may often occur from students and the school administration does not ask them for any compensation in most cases; they usually ask for an apology and a commitment.
Allah knows best.