diff --git a/lib/routes/dockerhub/build.js b/lib/routes/dockerhub/build.js index 39bc739d86..b3306a6641 100644 --- a/lib/routes/dockerhub/build.js +++ b/lib/routes/dockerhub/build.js @@ -5,6 +5,8 @@ module.exports = async (ctx) => { const namespace = `${owner}/${image}`; + const link = `https://hub.docker.com/r/${namespace}`; + const data = await axios.get(`https://hub.docker.com/v2/repositories/${namespace}/tags/?page_size=5`); const metadata = await axios.get(`https://hub.docker.com/v2/repositories/${namespace}`); @@ -12,7 +14,7 @@ module.exports = async (ctx) => { const out = list.map((item) => ({ title: `${namespace}:${tag} was built. ${(item.images[0].size / 1000000).toFixed(2)} MB`, - link: `https://hub.docker.com/r/wangqiru/ttrss/`, + link, author: owner, pubDate: item.last_updated, })); @@ -20,7 +22,7 @@ module.exports = async (ctx) => { ctx.state.data = { title: `${namespace}:${tag} build history`, description: metadata.description, - link: `https://hub.docker.com/r/${namespace}`, + link, item: out, }; };