Add a better log message for reusable workflow calls

This commit is contained in:
Henry Mercer 2022-12-21 11:13:48 +00:00
parent 8d1e008ecb
commit 8b9e982393
3 changed files with 10 additions and 1 deletions

3
lib/workflow.js generated
View file

@ -247,6 +247,9 @@ function getWorkflowRunID() {
}
exports.getWorkflowRunID = getWorkflowRunID;
function getStepsCallingAction(job, actionName) {
if (job.uses) {
throw new Error(`Could not get steps calling ${actionName} since the job calls a reusable workflow.`);
}
const steps = job.steps;
if (!Array.isArray(steps)) {
throw new Error(`Could not get steps calling ${actionName} since job.steps was not an array.`);