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

Implement composite actions support for job matrixes #810

Closed
webknjaz opened this issue Nov 17, 2020 · 6 comments
Closed

Implement composite actions support for job matrixes #810

webknjaz opened this issue Nov 17, 2020 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@webknjaz
Copy link

Describe the enhancement

I was pleasantly surprised when I learned about the composite actions. However, there's this one thing missing. Azure Pipelines let have the concept of templates giving you the flexibility of generating job matrices based on the user input. For example https://github.com/asottile/azure-pipeline-templates.

I'd like to be able to do the same in the GitHub Actions ecosystem. Currently, composite actions are the closest thing to allowing users to ship parametrized shareable pieces of workflows.

I think it'd be great if those pieces of workflows could contain matrixes of jobs rather than just steps. Think about it: it is pretty common for library/framework maintainers to test their projects across a variety of envs. People have to keep copy-pasting those matrixes from one project to another and once the time comes to upgrade them, they have to remember all the places across projects where the matrix definitions have to be updated.

OTOH if there was a mechanism to ship ready-to-use jobs where only the command for running tests would be parametrized and maybe some test env exclusions, it'd be so much more scalable maintenance-wise.

I'm not sure what the actual design of this feature would look like but this is my call to explore what could be done in this area to address this need.

Code Snippet

N/A

Additional information

I'm opening this as a follow-up for #438

@webknjaz webknjaz added the enhancement New feature or request label Nov 17, 2020
@webknjaz webknjaz changed the title Implement composite actions support for Implement composite actions support for job matrixes Nov 17, 2020
@vsoch
Copy link

vsoch commented Sep 24, 2021

We would also really really love this! ping @davidbeckingsale. Is this something that GitHub is working on?

@thboop
Copy link
Collaborator

thboop commented Feb 1, 2022

@webknjaz I think reusable workflows (which shipped at the end of last year) covers this nicely, is there anything else you would want to request, or can I close out this issue?

@vsoch
Copy link

vsoch commented Feb 1, 2022

Could you please point to an example that has a composite action with a matrix? I don’t think reusable workflows exactly covers that.

@thboop thboop self-assigned this Feb 1, 2022
@thboop
Copy link
Collaborator

thboop commented Feb 22, 2022

@vsoch sorry for the delay.

We have a workaround to support matrixes in reusable workflows, and our team is aware of the feature request to more formally support it. However, this isn't really something we can address in the runner, as a runner is a 1 to 1 mapping to a job, while matrixes run across a variety of runners, could you please add your feedback to the community forum thread

@thboop thboop closed this as completed Feb 22, 2022
@vsoch
Copy link

vsoch commented Sep 13, 2022

hey @thboop ! I ironically came searching for this again and found my own issue 😆

I clicked the link above for the workaround but it seems to be removed (and redirects to the discussions). Does it still exist, or do you remember the content so I can try searching for it?

@vsoch
Copy link

vsoch commented Sep 13, 2022

I think I might have found it? It looks like the workaround is to put the matrix on the outside?

https://docs.github.com/en/actions/using-workflows/reusing-workflows#using-a-matrix-strategy-with-a-reusable-workflow

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

No branches or pull requests

3 participants