I'm automating our build process. Before push is executed, I run the following script that logs the correct service account in.
if [[ "${DEPLOY_ENV}" == "production" ]]; then
gcloud auth activate-service-account --key-file "$DIR/production-secret.json"
else
gcloud auth activate-service-account --key-file "$DIR/test-secret.json"
fi
However, no matter which login, I'm always pushing to our "test" account's registry when I execute this command
gcloud docker -- push gcr.io/talk-like-humans/api:${IMAGE_VERSION}
Is there another command I need to run to set my push endpoint to be in the correct account?
Thanks, Todd