Replies: 2 comments
-
It looks like you can paginate the versions with more metadata here: https://docs.github.com/en/rest/packages/packages?apiVersion=2022-11-28#list-package-versions-for-a-package-owned-by-an-organization $ curl -L -H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "X-GitHub-Api-Version: 2022-11-28" \
-v \
'https://api.github.com/orgs/gethomepage/packages/container/homepage/versions?state=active&per_page=100' | jq .
< HTTP/2 200
< server: GitHub.com
< date: Fri, 17 May 2024 20:18:55 GMT
< content-type: application/json; charset=utf-8
< x-github-media-type: github.v3; format=json
< link: <https://api.github.com/organizations/122929872/packages/container/homepage/versions?state=active&per_page=100&page=2>; rel="next", <https://api.github.com/organizations/122929872/packages/container/homepage/versions?state=active&per_page=100&page=46>; rel="last"
< x-github-api-version-selected: 2022-11-28
[
# ... snip
{
"id": 212381245,
"name": "sha256:43a3ee88abe3b37c64bc52ea93da01c3dcb4a332a953bcd7f438c8d7328d3947",
"url": "https://api.github.com/orgs/gethomepage/packages/container/homepage/versions/212381245",
"package_html_url": "https://github.com/orgs/gethomepage/packages/container/package/homepage",
"created_at": "2024-05-06T05:20:30Z",
"updated_at": "2024-05-06T05:20:30Z",
"html_url": "https://github.com/orgs/gethomepage/packages/container/homepage/212381245",
"metadata": {
"package_type": "container",
"container": {
"tags": [
"v0.8.13",
"latest"
]
}
}
}
] |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hey @parkr! Nice one! That's exactly the resource I would have suggested! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Select Topic Area
Question
Body
I'm looking for a timestamp for each Docker tag from ghcr.io
The Docker Hub API gives me back rich metadata for each tag including
last_updated
:This API response can be used to say the
latest
tag was last updated on2024-05-14T19:42:08.294229Z
.However, it doesn't work for GHCR.io:
What I've Tried
I can fetch all tags by paginating
/v2/${repo}/tags/list
.This seems to be a rough implementation of the OCI image manifest API, specifically
/v2/OWNER/REPO/tags/list
.I know GitHub has this info since it shows up in the UI:
Beta Was this translation helpful? Give feedback.
All reactions