Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
if [ "$GCLOUD_SERVICE_KEY" = "" ]; then
echo "GCLOUD_SERVICE_KEY env variable is empty. Exiting."
exit 1
# Export to secrets file
echo $GCLOUD_SERVICE_KEY | base64 -di > gcloud-service-key.json
# Set project ID
gcloud config set project $GOOGLE_PROJECT_ID
# Auth account
gcloud auth activate-service-account --key-file gcloud-service-key.json
# Delete secret
rm gcloud-service-key.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.