-
Notifications
You must be signed in to change notification settings - Fork 27
Description
Our Windows, Linux, and Mac build steps are about 83% shared (based on comparing them with KDiff and visually estimating the percentage). However, they're all rewritten from scratch. The more that is added to them, the more the overhead is noticeable, and the more tools like KDiff are needed to ensure we don't fat-finger something.
This is not great. We should try to DRY out the configuration.
After some DuckDuckGo'ing and Googling, I think the best option may be Composite Actions.
StackOverflow on the topic: https://stackoverflow.com/questions/59757355/reuse-portion-of-github-action-across-jobs The 3rd answer, by Cardinal, has a nice breakdown of the options and relative advantages. I'm pretty sure we don't want reusable workflows, as we only want parts of the workflows (steps) to be reusable. Strategies miiiight work but I'm not sure we have quite enough shared. Composite Actions seem like the right balance.
Blog post on the topic: https://colinsalmcorner.com/github-composite-actions/ Uses this GitHub repo as reference: https://github.com/dotnet-architecture/eShopOnContainers/tree/dev/.github/workflows And this commit shows exactly what happens when you add Composite Actions. Look at basket-api.yml and .github/workflows/composite/build/action.yml in particular.