0

Looking for an example in GitHub actions workflow to clone a specifc image name by commit SHA from GHCR (GitHub registry) to ACR (Azure registry) with a need to copy all the tags and labels from the source repository to the target.

At the moment, I'm using Docker pull and push commands, but didn't find a way to fetch all the tags for given image sha from GHCR.

Appreciate your help,

Thanks.

Zefferno
  • 55
  • 1
  • 5

1 Answers1

1

I tried in my environment and got beow results:

To copy Github container registry to azure container registry, You can use the following this command.

Command:

az login
az acr login -n < your acr container registry >

az acr import \
  --name <container registry > \
  --source <ghcr.io/< username >/image:latest \
  --username <Git-hub RegistryUsername> \
  --password <Git-hub RegistryPassword>

Console:

enter image description here

Portal:

enter image description here

For more reference:

Import container images - Azure Container Registry | Microsoft Learn

Venkatesan
  • 3,748
  • 1
  • 3
  • 15