-
Notifications
You must be signed in to change notification settings - Fork 40
Description
Hi,
In my case container app have 2 images. First one is app image and second one is sidecar image to forward logs. It was working without yaml config file before I've added sidecar. Once I added, it gave me the following error:
ERROR: Usage error: --container-name is required when adding or updating a container.
So' I have decided use yaml config file option. But looks like I need to set image name which is created by the pipeline dynamically.
Is there a way to pass a parameter to the yaml file? Or indicating image name without using yaml file even better.
My action is like below
jobs:
release:
runs-on: ubuntu-latest
environment: ${{ inputs.Environment }}
steps:
- name: Log in to Azure
uses: azure/login@v1
with:
creds: ${{ secrets.AZCreds }}
- uses: actions/checkout@v4
- name: Build and deploy Container App
uses: azure/container-apps-deploy-action@v1
with:
imageToDeploy: "${{ inputs.Image }}:${{ inputs.ImageTag }}"
acrName: ${{vars.ACR_REGISTERY_NAME}}
containerAppName: ${{vars.CONTAINER_APP_NAME}}
resourceGroup: "${{ inputs.RG }}"
acrUsername: ${{ secrets.acrUserName }}
acrPassword: ${{ secrets.acrPassword }}
yamlConfigPath: ${{ github.workspace }}/set-container-name.yaml
And set-container-name.yaml file is like below:
properties:
template:
containers:
- name: be-container
I don't know whether this mixed usage allowed or not that I need to put everything in a yaml.