@@ -60,76 +60,6 @@ Process:
6060
6161See [ CONTRIBUTING.md] ( CONTRIBUTING.md ) .
6262
63- ## 📜 Why use [ cruft]
64-
65- What we need to share:
66-
67- - ` .github/workflows/* ` files
68- - scripts used for ` .github/workflows/* ` ** and** for local development
69-
70- ### Options considered
71-
72- #### GitHub actions
73-
74- Maintain a set of GitHub actions that task repos can reuse.
75-
76- ❌ Problems:
77-
78- - Each repo still needs its own workflow files referencing the actions
79- - The repos don't get locally runnable scripts
80- - [ nektos/act] could help to some extent, but it brings more complexity
81-
82- #### Git submodule
83-
84- Include the workflow files and scripts as a git submodule.
85-
86- ❌ Problems:
87-
88- - It's not possible to run workflows from git submodules ([ github #10892 ] )
89-
90- #### Reusable workflows
91-
92- Maintain a set of [ reusable workflows] that task repos can call.
93-
94- ❌ Problems:
95-
96- - Same as the [ GitHub actions] ( #github-actions ) approach
97-
98- #### GitHub template repo
99-
100- Create a [ template repo] , generate task repos from the template.
101- For existing repos, they would have to copy-paste the files directly.
102-
103- ❌ Problems:
104-
105- - The shared files get copied once and then never updated
106- - No good way to evolve functionality over time, introduce new checks etc.
107-
108- #### cruft
109-
110- Create a [ cookiecutter] template, include the template in task repos, use [ cruft]
111- to keep it up to date.
112-
113- ✅ What works:
114-
115- - Task repos include the workflow files and scripts from the template directly
116- - The repos get a solid mechanism for keeping the shared CI up to date
117- - It's straightforward to test CI changes directly in the target repo
118-
119- ❔ What may not:
120-
121- - To some extent, it's possible to patch the shared files and have the patches
122- respected during updates
123- - Task repo maintainers may decide not to contribute to the shared templates and
124- overly rely on local patches (we don't want that)
125- - Making local patches increases the chance of merge conflicts during the update
126- (which may be good, because it discourages the above)
127-
12863[ cruft ] : https://cruft.github.io/cruft
129- [ nektos/act ] : https://github.com/nektos/act
130- [ github#10892 ] : https://github.com/orgs/community/discussions/10892
131- [ reusable workflows ] : https://docs.github.com/en/actions/how-tos/reuse-automations/reuse-workflows#calling-a-reusable-workflow
132- [ template repo ] : https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-template-repository
133- [ cookiecutter ] : https://cookiecutter.readthedocs.io/en/stable/
13464[ uv ] : https://docs.astral.sh/uv/
13565[ Renovate ] : https://docs.renovatebot.com/
0 commit comments