For some reason, when updating `base-href` using `+=`, yq updates _all_
entries matching the LHS selection. This means that all non-main
branches get `"base-href": "/nixvim/24.11/"` in the job matrix.
This gets passed in as an overridden attr when building the docs, and is
used to determine which list item represents the currently-being-built
docs; therefore both 25.05 and 24.11 think they are 24.11...
For some reason, while `+=` does this, `=` does not. So switched to
using that.
Fix typo `inputs.ref` → `matrix.ref`.
This caused an empty string to be assigned to the checkout action's
`ref` input, meaning it used its default value `github.ref`.
Therefore all "versions" of the docs were actually building `main` 😂
Instead, we actually want to checkout the ref from the job's `matrix`.
Extract the "build" part of building & deploying the docs website into a
`build-docs` composite action.
Refactor the workflow to use a matrix job strategy; allowing each branch
to be built in parallel and in isolation.
In a subsequent job, we combine the builds into a single artifact.
This changes how we think about this directory; it does not need to be
exclusively for scripts related to updates, but should be a place for
any scripts intended to be run by CI workflows.
This mindset should make it easier to develop and test the business
logic of workflows, without always needing to test "in production" on
the nixvim repo or a fork.
Adds a GitHub workflow to create backport PRs when merged PRs have a
"backport" label.
Based on the workflow used by nixpkgs:
2566f9dc/.github/workflows/backport.yml
Rename `inputs.nixpkgs` to `inputs.dev-nixpkgs` to avoid shadowing the
root flake's `inputs.nixpkgs`.
Having the dev flake shadow an input can be confusing, since overriding
the root flake's input will have no effect when evaluating outputs that
depend on the dev partition.
The only reason we specify a `nixpkgs` input at all here, is so the
other inputs can follow it.
Once nix 2.26 is more prevalent, we can follow the root flake's inputs
using a `"path:../.."` input.
Need to use raw output to avoid having a quoted string, otherwise we end
up with a malformed flakeref:
error: in URL 'github:NixOS/nixpkgs/"2d068ae5c6516b2d04562de50a58c682540de9bf"',
'"2d068ae5c6516b2d04562de50a58c682540de9bf"' is not a commit hash or branch/tag name
This removes the need for end-users to manually set
`nixvim.inputs.devshell.follows = ""` (etc)
We offload evaluation of some of our flake modules into a `dev`
partition submodule.
- When its not needed, this submodule is not evaluated.
- When it is needed, it fetches extra inputs from `flake/dev/flake.nix`
as part of evaluating the submodule.
See https://flake.parts/options/flake-parts-partitions.html
Most of the time we want to re-apply "manual"/"additional" commits from
the already open PR, however it is possible we may wish to run the CI
without doing so.
Add an on-by-default tickbox to toggle the `re_apply` step.
Instead of comparing the nixpkgs input revision, we can re-apply any
manually committed changes and then check if any files are different
before pushing.
Cancelling via `exit 1` will mark the workflow as "failed". Instead we
can write a `cancelled` step output and have all the following steps
be conditional.