What is the proper syntax to use multiple secret_environment_variables in github actions when setting up a cloud function?

Viewed 9

The only resource I can find for setting up secret_environment_variables is from this link

https://github.com/google-github-actions/deploy-cloud-functions but there is not much documented about how to add multiple secrets from secrets manager.

According to the document I set mine up as

secret_environment_variables: 'SECRET_NAME=projects/projectid/secrets/secretsid/versions/versionid'

This only seems to work for one secret. I tried different ways like stacking them, using comma separation, keeping them on 1 line. But I cannot find a way to get multiple variables and I cannot find documentation that explains the how.

1 Answers

From testing a few ways this is how I got it to work.

secret_environment_variables: 'SECRET_NAME=projects/projectid/secrets/secretsid/versions/versionid,SECRET_NAME=projects/projectid/secrets/secretsid/versions/versionid'

It has to be in the same line and in the same string.

Related