Commit graph

110 commits

Author SHA1 Message Date
Matt Sturgeon
8e732cfac1
flake/dev: rename nixpkgs input to avoid shadowing
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.
2025-03-28 04:41:55 +00:00
dependabot[bot]
3a3abf1170
ci: bump cachix/install-nix-action from 30 to 31
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 30 to 31.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Commits](https://github.com/cachix/install-nix-action/compare/v30...v31)

---
updated-dependencies:
- dependency-name: cachix/install-nix-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-11 16:04:21 +00:00
Gaetan Lepage
268c2680a3 ci: add dependabot and track github-actions dependencies 2025-03-11 16:51:06 +01:00
Gaetan Lepage
bc34099731 ci/documentation: bump cachix action to v16 2025-03-10 21:17:13 +01:00
Matt Sturgeon
53f9d242ff
ci/update: link to workflow run in PR body 2025-02-24 21:26:33 +00:00
Matt Sturgeon
5cd74b54ad
ci/update: document how to re-update in PR body 2025-02-24 21:26:32 +00:00
Matt Sturgeon
723630ca40
ci/update: write PR body dynamically 2025-02-24 21:24:12 +00:00
Matt Sturgeon
4b0de83c39
ci/update: drop empty commits on re-apply 2025-02-24 16:04:29 +00:00
Matt Sturgeon
05981008b7
ci/update: fix inputs.nixpkgs.rev eval
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
2025-02-24 13:06:38 +00:00
Matt Sturgeon
6d10fc0c87
flake: partition dev dependencies
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
2025-02-23 17:23:57 +00:00
Matt Sturgeon
5281e8c583
ci/update: allow disabling re-applying commits
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.
2025-02-05 17:06:17 +00:00
Matt Sturgeon
61fdbe2647
ci/update: fix re-apply commit order
We need to reverse the `rev-list` output so that the commits are
re-applied in the correct order; oldest first.
2025-02-05 16:51:58 +00:00
Matt Sturgeon
93df574b42
ci/update: fix create pr step not having $pr_num 2025-01-30 21:24:32 +00:00
Matt Sturgeon
7f5dc96b83
ci/update: re-apply manual commits from open PR
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.
2025-01-30 21:24:25 +00:00
Matt Sturgeon
f9904d22df
ci/update: don't request review on the PR
@github-actions[bot] doesn't have access to nix-community teams, so it
can't request @nix-community/nixvim review the PR.
2025-01-30 19:20:44 +00:00
Matt Sturgeon
f028201847
ci/update: don't assign a team to the PR
Only users can be assigned to PRs, not teams.
2025-01-30 19:01:46 +00:00
Matt Sturgeon
8bf206eb75
ci/update: drop dependency on peter-evans/create-pull-request
We can create/update PRs using the `gh pr` command, no need for a third
party dependency.
2025-01-30 18:04:58 +00:00
Matt Sturgeon
bffee37f57
ci/update: use if then else for setting cancelled step output
The simpler `[[ ]] &&` construct can exit non-zero, causing the workflow
to fail.
2025-01-30 15:57:24 +00:00
Matt Sturgeon
818c2906e9
ci/update: cleanup summary step 2025-01-28 13:52:08 +00:00
Matt Sturgeon
62a0dfbe5d
ci/update: cancel gracefully
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.
2025-01-28 13:52:07 +00:00
Matt Sturgeon
4652e38ee6
ci/update: add input checkbox for checking nixpkgs was bumped
This is done by default when scheduled, but can be explicitly enabled
when running manually.
2025-01-28 13:01:50 +00:00
Matt Sturgeon
c3d95240c4
ci/update: check against base branch if no PR is open 2025-01-28 13:01:20 +00:00
Matt Sturgeon
30c2292b29
ci/update-other: use a job matrix
This will allow us to add/remove other branches to schedule updates for
more easily.
2025-01-25 18:42:17 +00:00
Matt Sturgeon
5121c309b3
ci/update-other: remove redundant condition
This workflow is only ever run on-schedule. There's no reason to check
the event name in an if-condition.
2025-01-25 18:41:34 +00:00
Matt Sturgeon
91e2e6fa03
ci/update-other: pass --repo to gh
In this case, we don't checkout the repo. Therefore we need to tell `gh`
what repo to use, since it can't guess based on `.git`.
2025-01-25 18:40:36 +00:00
Matt Sturgeon
5fda6e093d
ci/update: slightly cleanup cancellation summary 2025-01-24 19:39:01 +00:00
Matt Sturgeon
0b6be86756
ci/update: fix graphql formatting 2025-01-24 16:48:08 +00:00
Matt Sturgeon
f4ba44225e
ci/update: slightly simplify jq query 2025-01-24 16:48:07 +00:00
Matt Sturgeon
bd3184f495
ci/update: check whether a PR is already open 2025-01-24 16:24:35 +00:00
Matt Sturgeon
85bef9e191
ci/update: fix getFlake expecting an absolute path
Pass in `$PWD` instead of `.`, because `builtins.getFlake` does not
permit relative paths.
2025-01-23 14:58:47 +00:00
Matt Sturgeon
7dc67410bb
ci/update: cancel scheduled runs that don't bump nixpkgs
This should help mitigate spammy force-pushes that don't actually update
the nixpkgs input.

This only affects _scheduled_ runs. Manually triggered updates will
always force-push to the update branch.
2025-01-23 02:54:11 +00:00
Matt Sturgeon
a2a4befdaf
ci/update: cleanup names & comments 2025-01-22 20:49:50 +00:00
Matt Sturgeon
6046ad79f0
ci/update: schedule main branch daily, other branches weekly
Split scheduling other branches into a dedicated workflow. The main
update workflow is no longer responsible for triggering the workflow on
_other_ branches.
2025-01-22 20:15:57 +00:00
Gaetan Lepage
1036b8f8b6 ci/update: remove nixos-24.05 update action 2025-01-20 07:16:02 +00:00
Matt Sturgeon
cf647bc045
ci: drop 24.05 support 2025-01-19 10:32:11 +00:00
Gaetan Lepage
880a570588 ci: add support for new stable nixos-24.11 branch 2024-11-30 23:33:30 +01:00
Matt Sturgeon
98bedb5eeb
ci/docs: stable -> 24.05 in docs path 2024-11-30 21:59:09 +00:00
Matt Sturgeon
72762c8ef1
ci/docs: remove on 24.05 branch
This doesn't work because we can only deploy docs from the main branch.
2024-11-30 20:04:09 +00:00
Matt Sturgeon
c1271fa10a
ci: fix nix-install-action versions
`30` -> `v30` 😭
2024-11-22 22:37:05 +00:00
Matt Sturgeon
fb49a740f8
ci: bump nix-install-action 2024-11-22 21:21:36 +00:00
Matt Sturgeon
863d7d5ade
docs: link to all "available" versions of the docs 2024-11-22 09:13:11 +00:00
Matt Sturgeon
9416bc9018
docs/ci: use nix build --argstr to safely supply input
Rather than interpolating input (flakeref & baseHref) into the build
expression, take advantage of `--argstr`.

See "Common evaluation options" in `nix build --help` for more detail.
2024-11-20 19:41:14 +00:00
Matt Sturgeon
2017830a2c
docs/ci: fix a typo when calling mkdir -p
Should have been included in 8524447554
2024-11-18 22:33:22 +00:00
Matt Sturgeon
8524447554
docs/ci: fix docs being installed to nixvim/nixvim/<subdir>
We don't need to specify `/nixvim/` as part of our install path as that
is where gh-pages uploads to by default.

Rather, we only need to specify the full `/nixvim/foo/` in the base-href
and the install path should just be `/foo`.
2024-11-18 22:16:16 +00:00
Matt Sturgeon
2bc8dc86a0
ci/docs: fix env vs environment error 2024-11-18 21:14:40 +00:00
Matt Sturgeon
99b066ba6d
docs: only set base-href in CI built docs
This reverts commit c12e59ff7c
2024-11-18 19:54:38 +00:00
zowoq
c2080ede4f ci(Mergify): configuration update
Signed-off-by: null <null>
2024-09-20 12:57:37 +10:00
Matt Sturgeon
4697b96a01
mergify: fix "update PR" logic
We can no longer simply check the files list matches `[ flake.lock ]`,
since we now also touch `generated/` files.

Mergify conditions cannot be checked against "all" list items; checks
are always applied against "any" item. Therefore we need some
double-negatives to check that "any item does not match a regex that
does not match (flake.lock|generated/.*)".

Yes, this is horrible.
2024-09-12 10:31:45 +01:00
Matt Sturgeon
6cbcac1d43
mergify: use @nix-infra-bot to update queued PRs 2024-09-12 10:31:45 +01:00
Austin Horstman
78fc4be6a8
workflows/update: only run upstream 2024-08-17 14:44:48 -05:00