Skip to content

feat: Add script for fetching env file - #1188

Draft
Terryhung wants to merge 1 commit into
masterfrom
terryhung/add-the-script-for-fetching-secret
Draft

feat: Add script for fetching env file#1188
Terryhung wants to merge 1 commit into
masterfrom
terryhung/add-the-script-for-fetching-secret

Conversation

@Terryhung

Copy link
Copy Markdown
Collaborator

No description provided.

Comment on lines +4 to +10
response=$(curl "https://secretmanager.googleapis.com/v1/projects/protocol-labs-data/secrets/LILY_ENV_FILE/versions/latest:access" \
--request "GET" \
--header "authorization: Bearer $(gcloud auth print-access-token)" \
--header "content-type: application/json")

# Extract the `.payload.data` field from the response JSON
data=$(echo $response | jq -r '.payload.data')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:

Suggested change
response=$(curl "https://secretmanager.googleapis.com/v1/projects/protocol-labs-data/secrets/LILY_ENV_FILE/versions/latest:access" \
--request "GET" \
--header "authorization: Bearer $(gcloud auth print-access-token)" \
--header "content-type: application/json")
# Extract the `.payload.data` field from the response JSON
data=$(echo $response | jq -r '.payload.data')
response=$(curl "https://secretmanager.googleapis.com/v1/projects/protocol-labs-data/secrets/LILY_ENV_FILE/versions/latest:access" \
--request "GET" \
--header "authorization: Bearer $(gcloud auth print-access-token)" \
--header "content-type: application/json" | jq -r '.payload.data')

to make it simpler

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants