Skip to content

Commit 130e502

Browse files
ci: regenerate bun.nix automatically (ccusage#1909)
* ci: regenerate bun.nix automatically Run the bun.nix generator as a treefmt formatter on nix/tools/*/bun.lock so autofix.ci commits regenerated derivations on dependency PRs, and drop the manually dispatched Renovate workflow it replaces. * ci: run bun.nix generator from autofix.ci treefmt-nix excludes *.lock by default, so a bun.lock formatter never runs. Call generate-bun-nix directly in the autofix.ci job instead. * ci: keep only bun.nix changes from the generator --------- Co-authored-by: Cursor Agent <[email protected]>
1 parent e4f63ba commit 130e502

3 files changed

Lines changed: 8 additions & 225 deletions

File tree

‎.github/workflows/autofix.yaml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ jobs:
2424
- uses: ./.github/actions/setup-nix-cache
2525
with:
2626
disk-job: preflight
27+
- name: Regenerate Bun derivations
28+
run: |
29+
nix run .#generate-bun-nix
30+
git restore --staged --worktree -- . ':(exclude,glob)nix/tools/*/bun.nix'
31+
git clean -fd -- . ':(exclude,glob)nix/tools/*/bun.nix'
2732
- name: Apply formatting and lint fixes
2833
run: |
2934
nix fmt -- --no-cache

‎.github/workflows/renovate-bun-nix.yaml‎

Lines changed: 0 additions & 222 deletions
This file was deleted.

‎nix/treefmt.nix‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,9 @@ in
241241
program = lib.getExe schemaGen;
242242
};
243243
# `nix run .#generate-bun-nix` derives every committed bun.nix from its
244-
# sibling bun.lock. Renovate uses this before committing dependency
245-
# updates, while contributors can use `just gen-bun-nix` when a manifest
246-
# also needs Bun to resolve a new lockfile.
244+
# sibling bun.lock. autofix.ci runs it on every pull request, while
245+
# contributors can use `just gen-bun-nix` when a manifest also needs Bun
246+
# to resolve a new lockfile.
247247
apps.generate-bun-nix = {
248248
type = "app";
249249
program = lib.getExe generateBunNix;

0 commit comments

Comments
 (0)