Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reusable workflows support #66

Open
alvintang opened this issue Feb 21, 2023 · 1 comment
Open

Reusable workflows support #66

alvintang opened this issue Feb 21, 2023 · 1 comment

Comments

@alvintang
Copy link
Contributor

Hi @regadas! Thanks for all your work on this. I have an issue and would like your thoughts on it.

I currently have an open PR to support reusable workflows but it only adds the types needed. To call a reusable workflow, it has to be done on the job level so a uses key will be used instead of steps. My initial thought is to make jobs.steps and jobs.runs-on Optional but this will break existing workflows (including ours) since they have to be changed to Optional values. What's your take on this?

My current work around is to merge the records e.g.

GithubActions.Workflow::{
...
, jobs = [] : List { mapKey : Text, mapValue : GithubActions.Job.Type }
}
//  { jobs = toMap { job1.uses = "my-reusable-workflow@master" } }
@regadas
Copy link
Owner

regadas commented Apr 29, 2023

Hi @alvintang sorry for the long delay.

My initial thought is to make jobs.steps and jobs.runs-on Optional

Right, after a fast look I think that makes sense since those will not be required.

but this will break existing workflows (including ours) since they have to be changed to Optional values. What's your take on this?

If we do a versioned release first. You could move the existing ones to that, and then we introduce the breaking change in a new version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants