Docker Hub Build Parameters

hi all relatively new to dockerhub i had a quick question, is it possible to get build parameters in an automated dockerhub built ie --build-arg GIT_SHA1=$(git rev-parse --short HEAD) . as im trying to attach a git hash to my docker environment, any help is appreciated!

Are you whitelisting GIT_SHA1 in your Dockerfile? E.g. ARG GIT_SHA1
All build args that are not part of the predefined ones needs to be whitelisted.
Have you verified that the substitution works?