You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Description: Takes 1 arguement with name of environment variable which contains JSON representation of .env secrets and writes actual .env file. Allows many GitHub Secrets to be passed through into Docker container together without hardcoding.
importjson
importsys
importos
args=sys.argv
secrets_var=sys.argv[1]
secrets_json_string=os.environ[secrets_var]
secrets=json.loads(secrets_json_string)
f=open(".env", "w")
forkey, valueinsecrets.items():
# handle secrets that contain newlines and literal special characters