The current WorkflowJob class emphasizes 'steps' but there is another way to create job by using a reusable workflow.
In order to add support for reusable workflows in our current WorkflowJob type should we.
- Add
uses, with and secrets to the current WorkflowJob
- Split
WorkflowJob into 2 sub types, WorkflowStepJob (or something) and WorkflowReusableJob with the parent of WorkflowJob.
The cons to approach 1 is uses, with, and secrets are ONLY for reusable jobs and would introduce the ability to construct an invalid job.
The cons to approach 2 are that its clearly binary breaking. But this MIGHT be worth it given the issues with approach 1.
Happy to submit a PR to address this, but would like to know which approach to use before i begin.
The current
WorkflowJobclass emphasizes 'steps' but there is another way to create job by using a reusable workflow.In order to add support for reusable workflows in our current
WorkflowJobtype should we.uses,withandsecretsto the currentWorkflowJobWorkflowJobinto 2 sub types,WorkflowStepJob(or something) andWorkflowReusableJobwith the parent ofWorkflowJob.The cons to approach 1 is
uses,with, andsecretsare ONLY for reusable jobs and would introduce the ability to construct an invalid job.The cons to approach 2 are that its clearly binary breaking. But this MIGHT be worth it given the issues with approach 1.
Happy to submit a PR to address this, but would like to know which approach to use before i begin.