According to the docs $GITHUB_TOKEN should be defined in the environment so you should be able to export GITHUB_TOKEN=asdfg before running the build:
secrets: list of secrets exposed to the build. The value of each secret refers to a file. Okteto will resolve references containing a $ sign in this file to the environment variable value on the machine okteto is running on.
Okteto secrets are runtime secrets so they are not available at build time