What is the best way to pull an image on Azure container group from Github Container Registry

71 Views Asked by At

I'm working on a deployment pipeline using Github Action. It should build a docker image and push it to github container registry, and then pull/start the container on Azure.

I have it all working, using the GITHUB_TOKEN as my image registry credentials. The issue is that the GITHUB_TOKEN is short-lived. Which means, the image starts well, but if, in any case, I have to restart the container, or scale, after the deployment, then the GITHUB_TOKEN is no longer valid, and Azure can't pull the image from the registry.

What should I do ? I think my only option would be to use a PAT, which is not recommended. Or maybe, forget about the Github registry, and use a container registry in Azure ?

0

There are 0 best solutions below