Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate GitHub workflows from Organist #147

Open
2 tasks
thufschmitt opened this issue Sep 28, 2023 · 2 comments
Open
2 tasks

Generate GitHub workflows from Organist #147

thufschmitt opened this issue Sep 28, 2023 · 2 comments
Assignees

Comments

@thufschmitt
Copy link
Member

thufschmitt commented Sep 28, 2023

Provide an easy-to-use but flexible framework for generating GH actions with Organist.

  • The simplest use-case would be something along the lines of:

    {
        ci.github = Organist.ci.github.common_workflow
    }
    

    which should do what you expect™

  • This should be extensible through some specific configuration options. For instance:

    • Setting ci.github_actions.common.cachix.{token,cache} should enable cachix on the workflow;
    • Similarly, enabling the magic Nix cache should be a simple toggle;
  • A lower-level interface should also be available for writing workflows by hand

  • If reasonably possible, both interfaces should be usable at the same time (to add some custom overrides to the default interface for instance, or import bits of it to a custom workflow)

All of that should

  1. Be properly typed to get some direct error reporting
  2. Play well with the LSP (as much as can be)

Tasks

@YorikSar
Copy link
Collaborator

Are you sure about calling it ci.github_actions instead of just ci.github? Later looks better, even if it's not as precise.

It's not clear to me the separation between "low" and "high" level interfaces. I think "low level" would be writing workflows and "high level" would be turning knobs and picking workflows for the library.

I'd also suggest:

  • add a flag to enable GitHub workflow generation, like ci.github.enable = true, so that we can template the whole project at once
  • have a proper support for configuring multiple workflows from the start, so that "default" workflows would include all of per-commit checks, periodic dependency updates and release workflows.

@thufschmitt
Copy link
Member Author

Are you sure about calling it ci.github_actions instead of just ci.github? Later looks better, even if it's not as precise

Fair enough. I'll update the issue description to match that

It's not clear to me the separation between "low" and "high" level interfaces. I think "low level" would be writing workflows and "high level" would be turning knobs and picking workflows for the library.

My idea was that “low level” is directly writing workflows using GitHub's schema (except in Nickel), while “high-level” is providing an opinionated library of relevant workflows for projects using Organist. Does that match your understanding?

add a flag to enable GitHub workflow generation, like ci.github.enable = true, so that we can template the whole project at once

Yes, that sounds quite reasonable indeed

have a proper support for configuring multiple workflows from the start, so that "default" workflows would include all of per-commit checks, periodic dependency updates and release workflows.

Yes, we'll need to keep that in mind indeed. Although reality will probably remind us of it if we ever forget 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants