Import / Reuse jobs across workflows (GitHub Actions)

Hi, a downside of github actions are the workflow yml which can get pretty big. It would be pretty nice if it would be possible to import workflow jobs from separate files, just like it is possible with actions. This would reduce the size of workflow files by a large amount and enable the possibility to reuse jobs by passing input parameters.
Am i the only one with this issue? Would this feature be appreciated by others aswell?

2 Likes

Thank you for sharing your thoughts with us!

We do have workflow templates, but they are only for public repositories for non-Enterprise customers.

However if this isn’t what you’re looking for, we recommend adding additional feedback to this feature request by submitting a feedback form:

Our roadmap is now publicly visible, so we recommend that you keep an eye on the GitHub Blog and roadmap for the latest announcements about new features.

We’re also interested in being able to reuse more code between workflows and have pondered different ways to package things. This roadmap item seems like it might be useful for our use case where we run a custom dependency update flow on all of our python repos that is similar to but different than dependabot: Actions: Centrally managed workflow templates · Issue #98 · github/roadmap · GitHub

I’d also love to be able to update the logic across all python repos more easily, but for not we just filter for a list of repos and then push a bunch of PRs.

composite actions are so close, but missing uses
Next Steps for Fully Functioning Composite Actions · Issue #646 · actions/runner · GitHub et al. has been parked since their championing intern left github.

Other patterns which might help OP: