We can integrate github to build docker image with just few steps and it comes easily in nowadays. This is one of example:
In github put your Dockerfile in root folder like this

than go to hub docker. Choose create -> create automate build

choose from spesific repo, now support two types, either bitbucket or github.
choose link account than fill your credential.

Than choose repository to build image

choose build than let reset docker hub to build image. you can check status of your build on tab build details

Than if success your docker image updated/created succesfully.
For spesific case you can choose spesific branch, so image can have spesific tags rather than master.