Azure / container-apps-deploy-action

GitHub Action for building and deploying Azure Container Apps
MIT License
50 stars 30 forks source link

Supply environment variables as multi-line YAML value #103

Closed jamesharling closed 5 months ago

jamesharling commented 5 months ago

When supplying environment variables to the action, it asks for them. in the format

environmentVariables: ENV1=value1 ENV2=value2

however this is cumbersome to manage in a workflow. YAML supports multi-line strings such as:

environmentVariables: |
    ENV1=value1 \
    ENV2=value2

However this appears to be passed literally to the action, which then fails at deployment time:

/usr/bin/az containerapp update -n containerApp -g rg-containerApp --output none --replace-env-vars ENV1=value1 \
ENV2=value2
ERROR: (ContainerAppInvalidEnvVarName) Env variable name '\

Am I doing something wrong here, or is this not supported?

jamesharling commented 5 months ago

Now solved, this needed to be done using the folding syntax:

environmentVariables: >
    ENV1=value1 
    ENV2=value2