Azure / Azure/container-apps-deploy-action

ERROR: Usage error: --container-name is required when adding or updating a container.

Open
#62 13 comments 9 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
94
Forks
51
Avg merge
4d 18h
Merged PRs (30d)
1

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.