Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set a new revision with image that's already built - ACR login fails and succeeds. #100

Open
karpikpl opened this issue Jan 29, 2024 · 0 comments

Comments

@karpikpl
Copy link

karpikpl commented Jan 29, 2024

Hi,
I'm little confused by number of options on this action.

My ACA instance is already deployed, it has ACR pull permissions to ACR.
Container image is pushed to ACR and ready to deploy.
Service principal doing the deployment has both ACR pull and push permissions.

Why the action needs ACR credentials?

In my run, it both succeeds to login to container registry, just to fail few seconds later.

Run azure/container-apps-deploy-action@v1
  with:
    imageToDeploy: ***.azurecr.io/"django-samples/app:sha-a8a17f0"
    containerAppName: my-aca-tmp
    resourceGroup: my-aca-tmp-app
    acrUsername: ***
    acrPassword: ***
    acrName: ***
    targetPort: 8000
    environmentVariables: WEBSITE_HOSTNAME=my-aca-tmp.happyplant-xxx.eastus.azurecontainerapps.io APPLICATIONINSIGHTS_CONNECTION_STRING=InstrumentationKey=xxx
    disableTelemetry: false
  env:
    IMAGE_NAME: django-samples/app
Run CA_GH_ACTION_START_MILLISECONDS=$(date +%s%N | cut -b1-13)
Run az config set extension.use_dynamic_install=yes_without_prompt
WARNING: Command group 'config' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Run docker/[email protected]
Logging into ***.azurecr.io...
Login Succeeded!
Run CA_GH_ACTION_REGISTRY_LOGIN_ARG="--registry-server ***.azurecr.io --registry-username *** --registry-password ***"
Run CA_GH_ACTION_IMAGE_TO_BUILD="***.azurecr.io/github-action/container-app:7683692928.1"
Run CA_GH_ACTION_IMAGE_TO_DEPLOY="***.azurecr.io/"django-samples/app:sha-a8a17f0""
Run CA_GH_ACTION_RESOURCE_GROUP="my-aca-tmp-app"
Run az containerapp show \
Run CA_GH_ACTION_CONTAINER_APP_ENVIRONMENT="my-aca-tmp-env"
Run CA_GH_ACTION_INGRESS_ENABLED="true"
Run CA_GH_ACTION_TARGET_PORT="8000"
Run CA_GH_ACTION_TARGET_PORT_ARG="--target-port 8000"
Run CA_GH_ACTION_CONTAINER_APP_ENVIRONMENT_VARIABLES_ARG="--replace-env-vars WEBSITE_HOSTNAME=my-aca-tmp.happyplant-xxx.eastus.azurecontainerapps.io APPLICATIONINSIGHTS_CONNECTION_STRING=InstrumentationKey=xxx
Run CA_GH_ACTION_USE_UP="true"
Run CA_GH_ACTION_INGRESS_ARG=""
Run CA_GH_ACTION_CONTAINER_APP_ENVIRONMENT_VARIABLES_ARG="--env-vars WEBSITE_HOSTNAME=my-aca-tmp.happyplant-xxx.eastus.azurecontainerapps.io APPLICATIONINSIGHTS_CONNECTION_STRING=xxx"
Run az containerapp up \
ERROR: Failed to retrieve credentials for container registry. Please provide the registry username and password
Error: Process completed with exit code 1.

I just want to create a new revision with updated container image, is that the right way to do it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant