Added args to script
This commit is contained in:
@@ -16,8 +16,8 @@ const timeouts: Record<string, NodeJS.Timeout> = {}
|
||||
|
||||
async function parsePushHook(webhook: PushWebhook) {
|
||||
const repository: string|undefined = webhook.event_data?.repository?.repo_full_name
|
||||
const tag = webhook.event_data?.resources?.[0]?.tag
|
||||
if (!repository || !tag) {
|
||||
const {tag, resource_url} = webhook.event_data?.resources?.[0] ?? { }
|
||||
if (!repository || !tag || !resource_url) {
|
||||
return
|
||||
}
|
||||
clearTimeout(timeouts[repository])
|
||||
@@ -27,7 +27,7 @@ async function parsePushHook(webhook: PushWebhook) {
|
||||
.replace(/[^\w\s/]/gi, '-')
|
||||
.replace(/\//gi, '_')
|
||||
try {
|
||||
const cp = spawn(`./${filename}.sh`, [], {
|
||||
const cp = spawn(`./${filename}.sh`, [tag, resource_url], {
|
||||
cwd: rootDir,
|
||||
stdio: ['inherit', 'inherit', 'inherit', 'ipc']
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user