Combining a factory job and driving

Hi all I hope that someone can help me to get my head around the regulations regarding my job circumstances. I work a permanent night shift in a factory, I do Sunday, Monday and Tuesday nights 6pm until 6am for a month then I do Wednesday, Thursday and Friday nights 6pm until 6am for a month I would like to know how many hours I can legally drive on this shift pattern. When I finish on the Sunday, Monday , Tuesday I get until the following Wednesday off but when I finish the Wednesday Thursday Friday I go back in on the Sunday again which means I work 6 out of 7 nights. This sounds complicated but my week is usually 36hrs with no driving. I passed my class1 last month and I am trying to get some part time work to gain experience. Any help would be appreciated.

Paul.
Class C 2011
Class C+E 2013