Add a better log message for reusable workflow calls
This commit is contained in:
parent
8d1e008ecb
commit
8b9e982393
3 changed files with 10 additions and 1 deletions
3
lib/workflow.js
generated
3
lib/workflow.js
generated
|
|
@ -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.`);
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -18,6 +18,7 @@ interface WorkflowJob {
|
|||
name?: string;
|
||||
"runs-on"?: string;
|
||||
steps?: WorkflowJobStep[];
|
||||
uses?: string;
|
||||
}
|
||||
|
||||
interface WorkflowTrigger {
|
||||
|
|
@ -301,6 +302,11 @@ function getStepsCallingAction(
|
|||
job: WorkflowJob,
|
||||
actionName: string
|
||||
): WorkflowJobStep[] {
|
||||
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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue