Is there a way to get tags of a docker image on github container registry via curl or gh command?
curl \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${GH_TOKEN}"\
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/orgs/${ORG}/packages/container/${CONTAINER_IMG}
I have tried above but it does not give me docker tags for the iamge.
I am expecting to get the docker tags of ghcr.io containers.
If your environment allows installing software, it is easier to use
skopeo
. It is available by default on GitHub Action's Linux environment, and in most distros package repos.