Spinning the photo disc of a gym now awards you the gyms corresponding badge. It is then possible to increase your badge level by executing some specific actions, such as feeding the Pokemon of your team with berries, defending your gym or attacking an opponent gym. But, as there is no experience amount displayed on the badge, it's hard to determine how many points are needed to level up a badge, or how many points are awarded for executing a specific action.
How many points (or actions) are needed to get a new specific badge level? Do some actions award you with more points than the others?