What are the rules in the UK about attaching a GoPro camera to the outside of an aircraft?
Flyer magazine had an article on this recently. I've not been able to find the full article on their website, but I have found this which at least partially answers your question.

https://www.flyer.co.uk/gopro-camera-mounts-to-be-approved-by-engineer/

From the article, which was published in Feb 2016:


Mounting a camera is a modification, and requires either inspection from a Part66 licensed aircraft engineer, or via the CAA as a minor modification.
To approve any installation the engineer will need to complete a maintenance release checklist and complete the aircraft logbook entry.
If your aircraft is overseen by the British Microlight Aircraft Association or Light Aircraft Association, then their restrictions apply (but it doesn't say what those are).


It also references CAP1369, which is the CAA document covering mounted cameras. I'm including a link to that here.

CAA CAP1369