Azure / container-apps-deploy-action

GitHub Action for building and deploying Azure Container Apps
MIT License
52 stars 29 forks source link

Deploy image from Docker hub #16

Closed qpasssytem closed 1 year ago

qpasssytem commented 1 year ago

Not able to deploy image from docker hub instead of ACR. Here is the script I am using.

- name: Deploy to containerapp
  uses: azure/CLI@v1
  with:
    inlineScript: |
      az config set extension.use_dynamic_install=yes_without_prompt
      az containerapp registry set -n qpass-ca-dev -g qpass-dev --server docker.io --username  ${{ secrets.QPASSCADEV_REGISTRY_USERNAME }} --password ${{ secrets.QPASSCADEV_REGISTRY_PASSWORD }}
      az containerapp update -n qpass-ca-dev -g qpass-dev --image arupnayak/qpass-backend:${{ github.sha }}

Below error is occurring:

ERROR: (WebhookInvalidParameterValue) The following field(s) are either invalid or missing. Invalid value: "***/qpass-backend:41eb406c4be3b1f1a598559c453f069f4d9f764c": GET https:: UNAUTHORIZED: authentication required; [map[Action:pull Class: Name:***/qpass-backend Type:repository]]: template.containers.simple-hello-world-container.image.
Error: Error: az cli script failed.
cormacpayne commented 1 year ago

@qpasssytem Hey there, apologies for the delayed response; this repository is for the azure-container-apps-deploy-action GitHub Action and from the workflow that you've provided, it appears you're attempting to use the az containerapp module, which is found in the azure/azure-cli-extensions repository. Is there any specific issue that you're having with the GitHub Action, or would you be able to file an issue for the above in the azure-cli-extensions repository linked previously?

devadekunle commented 1 year ago

Hi @cormacpayne i faced this issue today with the azure container apps github action, and what resolved it for me was changing the registry url from docker.io to registry.hub.docker.com

cormacpayne commented 1 year ago

@devadekunle Hey Alugbin, thanks for the update on the resolution of your issue 🎉 Please feel free to let me know if there are any additional issues that you're facing when using the action.

@qpasssytem Hey there, are there any updates on the comment above? I just wanted to double-check if you were seeing issues specifically with the azure/container-apps-deploy-action GitHub Action or the az containerapp module hosted in a separate repository. Thanks in advance!

cormacpayne commented 1 year ago

@qpasssytem I'm going to close this issue since I believe your issue lies within the az containerapp module, but please feel free to let me know otherwise in a follow-up comment and I'll gladly re-open this issue for further discussion. Thanks!