Skip to content

ci: add manual nixpkgs version-bump dispatch workflow#39

Merged
smorin merged 1 commit into
mainfrom
ci/nixpkgs-update-dispatch
May 31, 2026
Merged

ci: add manual nixpkgs version-bump dispatch workflow#39
smorin merged 1 commit into
mainfrom
ci/nixpkgs-update-dispatch

Conversation

@smorin
Copy link
Copy Markdown
Owner

@smorin smorin commented May 31, 2026

Drafts the #3 accelerator we discussed — a workflow_dispatch-only workflow that opens/updates a togl+libtogl version-bump PR on NixOS/nixpkgs on demand.

Design (per our discussion):

  • Manual button only (workflow_dispatch) — r-ryantm stays the primary path; this is the optional fast lane.
  • Update-in-place for rapid releases: reuses a fixed head branch nixpkgs-auto-update/togl, so a second run updates the same open PR instead of opening a duplicate (answers the "invalidate prior PR?" question — you don't; it self-reconciles).
  • nix-update recomputes hash + cargoHash and builds to verify; commit/title follow nixpkgs' pkg: old -> new convention.
  • dry_run input to preview the diff without opening a PR.
  • Opens the PR cross-fork via peter-evans/create-pull-request + push-to-fork: smorin/nixpkgs.

Inert until you flip it on. Two prerequisites, both noted in the workflow header:

  1. The initial nixpkgs PR (#526149) must be merged (can't bump a package not yet in nixpkgs).
  2. Add repo secret NIXPKGS_UPDATE_TOKEN — a PAT for the smorin account (with the smorin/nixpkgs fork) and repo scope.

actionlint clean. Safe to merge now (does nothing until manually run); or hold until you're ready to wire the secret.

Add a workflow_dispatch-only "nixpkgs update" workflow that opens (or updates)
a single version-bump PR for togl + libtogl on NixOS/nixpkgs via nix-update +
peter-evans/create-pull-request.

It is an optional accelerator: the primary update path remains the r-ryantm bot
(enabled by passthru.updateScript on both derivations). Rapid successive
releases reuse a fixed head branch (nixpkgs-auto-update/togl) so a later run
updates the same open PR in place rather than opening a duplicate.

Inert until manually run; requires a NIXPKGS_UPDATE_TOKEN secret (a PAT with a
smorin/nixpkgs fork + repo scope) and the initial nixpkgs PR (#526149) merged.
Copilot AI review requested due to automatic review settings May 31, 2026 03:43
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a manually-triggered GitHub Actions workflow that opens (or updates in place) a single togl + libtogl version-bump PR against NixOS/nixpkgs, as an optional accelerator alongside the primary r-ryantm bot path. The workflow is inert until manually dispatched and depends on the initial nixpkgs PR being merged plus a NIXPKGS_UPDATE_TOKEN secret being configured.

Changes:

  • New workflow_dispatch-only workflow with optional version and dry_run inputs.
  • Uses nix-update to bump both togl and libtogl, recomputing hash/cargoHash and building to verify.
  • Pushes to smorin/nixpkgs fork and opens/updates a PR via peter-evans/create-pull-request on a fixed head branch (nixpkgs-auto-update/togl).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +69 to +88
- name: Record new version
id: after
run: |
new=$(grep -oP 'version = "\K[^"]+' pkgs/by-name/to/togl/package.nix)
echo "version=$new" >> "$GITHUB_OUTPUT"

- name: Show diff
run: git diff

- name: Open or update the bump PR
if: ${{ !inputs.dry_run }}
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
with:
token: ${{ secrets.NIXPKGS_UPDATE_TOKEN }}
push-to-fork: smorin/nixpkgs
branch: nixpkgs-auto-update/togl
base: master
delete-branch: true
commit-message: "togl,libtogl: ${{ steps.before.outputs.version }} -> ${{ steps.after.outputs.version }}"
title: "togl,libtogl: ${{ steps.before.outputs.version }} -> ${{ steps.after.outputs.version }}"
push-to-fork: smorin/nixpkgs
branch: nixpkgs-auto-update/togl
base: master
delete-branch: true
@smorin smorin merged commit 6ee8cb3 into main May 31, 2026
21 checks passed
@smorin smorin deleted the ci/nixpkgs-update-dispatch branch May 31, 2026 05:07
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.

2 participants