mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 01:38:19 +08:00
workflow: load metadata from github ci env
This commit is contained in:
1 parent
cb3f638a06
commit
af19d83111
1 file changed
+7
@@ -19,6 +19,7 @@ const beautifyOutputUrl = mapWebpackUrlPrefix([
|
||||
{ prefix: 'misc/.iconfont', replace: './ui/iconfont' },
|
||||
]);
|
||||
const smp = new SpeedMeasurePlugin();
|
||||
const event = process.env.GITHUB_EVENT_PATH ? require(process.env.GITHUB_EVENT_PATH) : {};
|
||||
|
||||
export default function (env = {}) {
|
||||
function esbuildLoader() {
|
||||
@@ -237,6 +238,12 @@ export default function (env = {}) {
|
||||
project_token: process.env.PT_PROJECT_TOKEN,
|
||||
upload: true,
|
||||
fail_build: false,
|
||||
branch: event.ref.replace('refs/heads/', ''),
|
||||
author: event.head_commit.author.email,
|
||||
message: event.head_commit.message,
|
||||
commit: process.env.GITHUB_SHA,
|
||||
committed_at: parseInt(+new Date(event.head_commit.timestamp) / 1000, 10),
|
||||
prior_commit: event.before,
|
||||
})] : [],
|
||||
],
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user