UnlyEd / next-right-now

Flexible production-grade boilerplate with Next.js 11, Vercel and TypeScript. Includes multiple opt-in presets using Storybook, Airtable, GraphQL, Analytics, CSS-in-JS, Monitoring, End-to-end testing, Internationalization, CI/CD and SaaS B2B multi single-tenancy (monorepo) support
https://unlyed.github.io/next-right-now/
MIT License
1.26k stars 111 forks source link

Refactor GHA workflows (reuse code) #394

Open Vadorequest opened 1 year ago

Vadorequest commented 1 year ago

Is your feature request related to a problem? Please describe. Some code is duplicated in the GHA workflows because we don't know how to reuse it.

Describe the solution you'd like See if https://github.com/actions/starter-workflows/issues/245#issuecomment-1445128447 could yield better solutions.

dxs0323 commented 7 months ago

Maybe it would be a good start to add general property "import" or "include" and possibly enable it to be either array or single value.

For instance: `import:

This example would finally have env variables added to env from file in import-env and steps would contain all steps from file in import.

Vadorequest commented 7 months ago

I'm not sure those options are actually being supported, we don't intend to change how YAML works.

dxs0323 commented 7 months ago

I think, the idea of reusability is probably impossible to implement without actually altering either yaml file or how yaml file is being processed. Maybe we do not need to copy/paste snippets and create another final yaml... maybe the only thing is to add some extra logic behind importing/including the other files. I am interested in this feature so I will be watching this feature regardless of the outcome.