Azure / Azure/container-apps-deploy-action
Wrong argument for environment variables when updating
- Dominant language
- TypeScript
- Stars
- 94
- Forks
- 51
- Avg merge
- 4d 18h
- Merged PRs (30d)
- 1
Description
Version 2 of this action passes `--env-vars` as a parameter to `az containerapp update`, but according to the [documentation](https://learn.microsoft.com/en-us/cli/azure/containerapp?view=azure-cli-latest#az-containerapp-update) the parameter should be `--set-env-vars`. This causes the following error: `unrecognized arguments: --env-vars`.

The content of my workflow file that caused the error is:
```
name: Dockerize and deploy SvelteKit project to Azure Container App
on:
push:
branches:
- main
workflow_dispatch:
permissions:
id-token: write
contents: read
jobs:
build-push-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Login to Azure
uses: Azure/login@v1.5.1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Build and deploy app to Azure Container Apps
uses: azure/container-apps-deploy-action@v2
with:
appSourcePath: ${{ github.workspace }}
acrName: ${{ secrets.ACR_NAME }}
containerAppName: ${{ secrets.CA_NAME }}
resourceGroup: ${{ secrets.CA_RG_NAME }}
imageToBuild: ${{ secrets.ACR_URL }}/my-app:${{ github.SHA }}.${{ github.RUN_ATTEMPT }}
targetPort: 3000
environmentVariables: >
"AUTHORITY=secretref:authority"
"TENANT_ID=secretref:tenant-id"
"CLIENT_ID=secretref:client-id"
"CLIENT_SECRET=secretref:client-secret"
"REDIRECT_URI=secretref:redirect-uri"
"COSMOS_ENDPOINT=secretref:cosmos-endpoint"
"COSMOS_DATABASE=secretref:cosmos-database"
"COSMOS_CONTAINER=secretref:cosmos-container"
```
It works fine as long as the `environmentVariables` parameter is not set. The only difference between the content of this file and my current file is that I use Azure CLI Action to set the enviroment variables in a previous step, as a workaround.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.