You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Actions: start accepting a config as input (#1991)
GitGitGadget's GitHub Actions all implicitly use the
[`defaultConfig`](https://github.com/gitgitgadget/gitgitgadget/blob/153badfc78153bb25d10e0e0d40c2cb3924d7f1b/lib/gitgitgadget-config.ts#L3-L45)
that hard-codes the configuration of the OG GitGitGadget that supports
the Git project (and the Git project _only_).
However, for a long time there have been feature requests and musings
towards using GitGitGadget also for other projects.
GitGitGadget already _does_ have some beginnings of a support for other
projects, e.g. the `IConfig` interface. With these changes, that
interface gets extended a little, a validator is added that can verify
whether or not an arbitrary object conforms to that interface, and then
new inputs are introduced, accepting this (JSON-encoded) configuration
as a user-provided string. The idea is that a project-specific fork of
https://github.com/gitgitgadget/gitgitgadget-workflows/ contains this
configuration in the `gitgitgadget-config.json` file in a dedicated
`config` branch, from where it is synchronized via a GitHub workflow to
the repository variable called `CONFIG`.
This somewhat non-trivial setup allows the config to be conveniently
tracked via Git, updated via Pull Requests, validated via GitHub
workflows, and still to be used in a trivial manner in the main
workflows via `${{ vars.CONFIG }}` (as opposed to having to play games
with multi-branch checkouts or `curl`'ing a file from a different
branch).
This PR is step number 2 in that direction. Step number 1 was to
register the [`cygwingitgadget` GitHub
org](https://github.com/cygwingitgadget/) for experimenting with
GitGitGadget support for a different mailing-list-based project than
Git: Cygwin.
That org is where I experimented with this change as well as with all
the others leading up to
gitgitgadget/gitgitgadget-github-app#7.
This PR is stacked on top of #1993 and #1994
0 commit comments