About Secret Keys Management in Docker of Huggingfacespace

Expose the secret SECRET_EXAMPLE at buildtime and use its value as git remote URL

RUN --mount=type=secret,id=SECRET_EXAMPLE,mode=0444,required=true
git init &&
git remote add origin $(cat /run/secrets/SECRET_EXAMPLE)
Copied

Expose the secret SECRET_EXAMPLE at buildtime and use its value as a Bearer token for a curl request

RUN --mount=type=secret,id=SECRET_EXAMPLE,mode=0444,required=true
curl test -H 'Authorization: Bearer $(cat /run/secrets/SECRET_EXAMPLE)

i Used This method from Hugging Docs To Access My Secret Token ,i kept my api key that i dont want others to use if they use it my bill go rocket so i kept it as secret but whenever someone duplicated my space the secret key is passing along with it how to stop sharing my secret key