From 414ae453c97921c30a4a4b76a5a5bb150d12bc11 Mon Sep 17 00:00:00 2001 From: Joel Male Date: Sun, 31 Mar 2024 22:24:25 +1000 Subject: [PATCH] wip --- dist/index.js | 3 +++ dist/main.js | 3 +++ dist/main.js.map | 2 +- src/main.ts | 5 +++++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/dist/index.js b/dist/index.js index 79f434ad..4cc4f85e 100644 --- a/dist/index.js +++ b/dist/index.js @@ -56,6 +56,9 @@ const http_1 = __nccwpck_require__(4319); const github_1 = __nccwpck_require__(5438); function run() { return __awaiter(this, void 0, void 0, function* () { + if (github_1.context.job === 'post') { + return; + } const url = core.getInput('url') ? core.getInput('url') : process.env.WEBHOOK_URL diff --git a/dist/main.js b/dist/main.js index 059abbd1..58a7437e 100644 --- a/dist/main.js +++ b/dist/main.js @@ -14,6 +14,9 @@ const http_1 = require("./http"); const github_1 = require("@actions/github"); function run() { return __awaiter(this, void 0, void 0, function* () { + if (github_1.context.job === 'post') { + return; + } const url = core.getInput('url') ? core.getInput('url') : process.env.WEBHOOK_URL diff --git a/dist/main.js.map b/dist/main.js.map index eb015414..a293cd3e 100644 --- a/dist/main.js.map +++ b/dist/main.js.map @@ -1 +1 @@ -{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAqC;AACrC,iCAA2B;AAC3B,4CAAuC;AAEvC,SAAe,GAAG;;QAChB,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;YAC9B,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;YACtB,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW;gBACvB,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW;gBACzB,CAAC,CAAC,EAAE,CAAA;QAER,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC;YACtC,CAAC,CAAC,IAAI,CAAC,Q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G,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,CAAC;aAClC,IAAI,CAAC,GAAG,CAAC,EAAE;YAEV,IAAI,GAAG,CAAC,MAAM,IAAI,GAAG,EAAE,CAAC;gBAEtB,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;gBACjB,OAAM;YACR,CAAC;QACH,CAAC,CAAC;aACD,KAAK,CAAC,GAAG,CAAC,EAAE;YACX,IAAI,CAAC,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC,CAAA;YAC1B,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;YACjB,OAAM;QACR,CAAC,CAAC,CAAA;IACN,CAAC;CAAA;AAED,SAAS,KAAK,CAAC,UAAU;IAEvB,IAAI,CAAC,SAAS,CAAC,yBAAyB,UAAU,EAAE,CAAC,CAAA;IAErD,MAAM,IAAI,KAAK,CAAC,oCAAoC,UAAU,EAAE,CAAC,CAAA;AACnE,CAAC;AAED,GAAG,EAAE,CAAA"} \ No newline at end of file diff --git a/src/main.ts b/src/main.ts index 58df8f7a..78878dec 100644 --- a/src/main.ts +++ b/src/main.ts @@ -3,6 +3,11 @@ import {http} from './http' import {context} from '@actions/github' async function run() { + // if its a post job do nothing + if (context.job === 'post') { + return + } + const url = core.getInput('url') ? core.getInput('url') : process.env.WEBHOOK_URL