@@ -564,7 +564,7 @@ const PackageJSON = __importStar(__webpack_require__(731));
564
564
//
565
565
function run() {
566
566
return __awaiter(this, void 0, void 0, function* () {
567
- core.info(`Workflow Dispatch Action v${PackageJSON.version}`);
567
+ core.info(`🏃 Workflow Dispatch Action v${PackageJSON.version}`);
568
568
try {
569
569
// Required inputs
570
570
const token = core.getInput('token');
@@ -597,17 +597,22 @@ function run() {
597
597
});
598
598
if (!foundWorkflow)
599
599
throw new Error(`Unable to find workflow '${workflowRef}' in ${owner}/${repo} 😥`);
600
- console.log(`Workflow id is : ${foundWorkflow.id}`);
600
+ console.log(`🔎 Found workflow, id : ${foundWorkflow.id}, name: ${foundWorkflow.name}, path: ${foundWorkflow.path }`);
601
601
// Call workflow_dispatch API
602
+ console.log('🚀 Calling GitHub API to dispatch workflow...');
602
603
const dispatchResp = yield octokit.request(`POST /repos/${owner}/${repo}/actions/workflows/${foundWorkflow.id}/dispatches`, {
603
604
ref: ref,
604
605
inputs: inputs
605
606
});
606
- core.info(`API response status: ${dispatchResp.status} 🚀 `);
607
+ core.info(`🏆 API response status: ${dispatchResp.status}`);
607
608
core.setOutput('workflowId', foundWorkflow.id);
608
609
}
609
610
catch (error) {
610
611
const e = error;
612
+ if (e.message.endsWith('a disabled workflow')) {
613
+ core.warning('Workflow is disabled, no action was taken');
614
+ return;
615
+ }
611
616
core.setFailed(e.message);
612
617
}
613
618
});
@@ -6201,7 +6206,7 @@ exports.default = _default;
6201
6206
/***/ 731:
6202
6207
/***/ (function(module) {
6203
6208
6204
- module.exports = {"name":"workflow-dispatch","version":"1.2.0 ","description":"Trigger running GitHub Actions workflows","main":"dist/index.js","scripts":{"build":"ncc build src/main.ts -o dist","lint":"eslint src/"},"keywords":["github","actions"],"author":"Ben Coleman","license":"MIT","devDependencies":{"@actions/core":"^1.10.0","@actions/github":"^5.1.1","@zeit/ncc":"^0.22.3","@typescript-eslint/eslint-plugin":"^5.41.0","@typescript-eslint/parser":"^5.41.0","eslint":"^8.26.0","typescript":"^4.8.4"}};
6209
+ module.exports = {"name":"workflow-dispatch","version":"1.2.1 ","description":"Trigger running GitHub Actions workflows","main":"dist/index.js","scripts":{"build":"ncc build src/main.ts -o dist","lint":"eslint src/"},"keywords":["github","actions"],"author":"Ben Coleman","license":"MIT","devDependencies":{"@actions/core":"^1.10.0","@actions/github":"^5.1.1","@zeit/ncc":"^0.22.3","@typescript-eslint/eslint-plugin":"^5.41.0","@typescript-eslint/parser":"^5.41.0","eslint":"^8.26.0","typescript":"^4.8.4"}};
6205
6210
6206
6211
/***/ }),
6207
6212
0 commit comments