Skip to content

feat(ci): dispatch lock-update event to nix-ai on release#44

Merged
JacobPEvans-personal merged 2 commits into
mainfrom
feat/dispatch-lock-updates
Jun 2, 2026
Merged

feat(ci): dispatch lock-update event to nix-ai on release#44
JacobPEvans-personal merged 2 commits into
mainfrom
feat/dispatch-lock-updates

Conversation

@JacobPEvans-personal
Copy link
Copy Markdown
Member

@JacobPEvans-personal JacobPEvans-personal commented Jun 2, 2026

Summary

  • Adds dispatch-lock-updates.yml — fires a repository_dispatch to nix-ai immediately after a nix-claude-code release is published, triggering the _update-flake-input reusable workflow to bump the nix-claude-code input within minutes. This replaces the Mon/Thu Renovate lockfile maintenance window with event-driven updates.

Changes

  • .github/workflows/dispatch-lock-updates.yml — thin workflow_call caller of dryvist/.github/_dispatch-flake-consumers.yml@main; keeps the release trigger and the DISPATCH_CONSUMERS repo variable (["nix-ai"]); all dispatch logic now lives centrally
  • No per-repo duplication of the App-token mint or gh api call

Context

Part of the event-driven flake-lock propagation chain:

nix-claude-code release → dispatch → nix-ai → push flake.lock → dispatch → nix-darwin

Depends on (merge first): dryvist/.github#21 (_dispatch-flake-consumers.yml@main)

Refs: dryvist/.github#21, dryvist/nix-ai#869, dryvist/nix-darwin#1174

Test Plan

  1. Verify feat(workflows): add reusable _dispatch-flake-consumers workflow .github#21 is merged (callers reference @main)
  2. nix flake check passes in this worktree (static)
  3. On next release, confirm repository_dispatch fires to nix-ai
  4. Confirm nix-ai's update-flake-input.yml receives and processes the event
  5. Verify flake.lock updates on nix-ai main and cascades to nix-darwin

🤖 Generated with Claude Code

@JacobPEvans-personal JacobPEvans-personal force-pushed the feat/dispatch-lock-updates branch from 12a866d to d9cf900 Compare June 2, 2026 01:17
After a nix-claude-code release is published, notify dryvist/nix-ai via
repository_dispatch so it bumps its nix-claude-code flake input without
waiting for the next Renovate lockFileMaintenance window (~Mon/Thu).

The dispatch uses the GitHub App token scoped to nix-ai. nix-ai's own
update-flake-input receiver and dispatch-to-nix-darwin workflows complete
the two-hop propagation chain.

Assisted-by: Claude:claude-opus-4-8
@JacobPEvans-personal JacobPEvans-personal force-pushed the feat/dispatch-lock-updates branch from d9cf900 to 337526f Compare June 2, 2026 16:46
Replace the 41-line inline job with a 3-line call to the new reusable
workflow in dryvist/.github. All logic (matrix fan-out, App-token mint,
cross-repo dispatch) now lives in one place.

Depends on: dryvist/.github adding _dispatch-flake-consumers.yml@main
Refs: dryvist/.github#21

Assisted-by: Claude:claude-opus-4-8
JacobPEvans-personal added a commit to dryvist/.github that referenced this pull request Jun 2, 2026
Centralises the flake-consumer dispatch sender so every upstream repo
that needs to notify downstream consumers on a release (or flake.lock
push) can use a ~9-line caller instead of duplicating the full 41-line
token-mint + matrix-dispatch job.

Mirrors the conventions of the sibling _update-flake-input.yml:
- @V3 create-github-app-token, vars.GH_APP_CLIENT_ID / GH_APP_PRIVATE_KEY
- env-var injection guards on all run: steps
- permissions: {} at top level, contents:read at job level
- uses ${GITHUB_REPOSITORY_OWNER} instead of a hardcoded org name

vars.DISPATCH_CONSUMERS and vars.GH_APP_CLIENT_ID resolve in the caller's
context (workflow_call inherits caller vars), so they are read directly
inside this workflow without input plumbing. GH_APP_PRIVATE_KEY is
forwarded via `secrets: inherit` in each caller.

The source_input default (${{ github.event.repository.name }}) resolves
to the caller repo name, so callers typically need no `with:` block.

Unblocks: dryvist/nix-claude-code#44, dryvist/nix-ai#869

Assisted-by: Claude:claude-opus-4-8
@JacobPEvans-personal JacobPEvans-personal merged commit 8f12850 into main Jun 2, 2026
1 of 2 checks passed
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

Successfully merging this pull request may close these issues.

1 participant