[Dockerhub] Fix date and guid (#1717)

1. 原来的 `pubDate` 为 `2019-03-08T04:10:53.381143Z` 格式,现修改成 UTC 格式
2. 原来的 `guid` 为 link ,每次有新的 build 都是返回同一个 link ,现从接口中找了个不会重复的参数即 `pubDate` 作为 guid
This commit is contained in:
imlonghao
2019-03-11 10:55:35 +08:00
committed by DIYgod
parent 16f14998ed
commit 68b5e7f1ed

View File

@@ -16,7 +16,8 @@ module.exports = async (ctx) => {
title: `${namespace}:${tag} was built. ${(item.images[0].size / 1000000).toFixed(2)} MB`,
link,
author: owner,
pubDate: item.last_updated,
pubDate: new Date(item.last_updated).toUTCString(),
guid: item.last_updated,
}));
ctx.state.data = {