Skip to content

ci: move logic into an in-repo directory #3434

Open
@MattSturgeon

Description

@MattSturgeon

While it's nice for certain workflows not to need to checkout the repo, this makes things hard to develop and test.

We have some stuff in update-scripts already, but perhaps this being specifically focused on “updates” has given us tunnel vision...

Nixpkgs typically do a "sparse checkout" of the ci/ directory; "sparse" means other parts of the repo are not downloaded. This allows keeping most of the workflow's logic in nix & shell scripts that can be used or tested independently.

We could do something similar.

This may also make the recently added "supported versions" info in version-info.toml somewhat redundant, because we could have a script that downloads channels.nix from NixOS/infra and extracts the relevant info for the particular workflow. Such a script could be used by both docs and update-other, without #3431 needing to reference version-info.toml specifically.1

As another example, the logic in the docs workflow or the update workflow could be extracted into in-repo scripts that can be run/tested locally, without needing to actually run GitHub Actions.

Footnotes

  1. yes I feel a little silly realising this now, having only just merged that feature into version-info.toml...

Metadata

Metadata

Assignees

No one assigned

    Labels

    CI/CDRelated to CI or CD, i.e. GitHub Actions or Buildbottech debtRelated to technical debt and/or refactoring

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions