ci: add manual nixpkgs version-bump dispatch workflow#39
Merged
Conversation
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.
There was a problem hiding this comment.
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 optionalversionanddry_runinputs. - Uses
nix-updateto bump bothtoglandlibtogl, recomputinghash/cargoHashand building to verify. - Pushes to
smorin/nixpkgsfork and opens/updates a PR viapeter-evans/create-pull-requeston 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Drafts the #3 accelerator we discussed — a
workflow_dispatch-only workflow that opens/updates atogl+libtoglversion-bump PR on NixOS/nixpkgs on demand.Design (per our discussion):
workflow_dispatch) — r-ryantm stays the primary path; this is the optional fast lane.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-updaterecomputeshash+cargoHashand builds to verify; commit/title follow nixpkgs'pkg: old -> newconvention.dry_runinput to preview the diff without opening a PR.peter-evans/create-pull-request+push-to-fork: smorin/nixpkgs.Inert until you flip it on. Two prerequisites, both noted in the workflow header:
NIXPKGS_UPDATE_TOKEN— a PAT for thesmorinaccount (with thesmorin/nixpkgsfork) andreposcope.actionlint clean. Safe to merge now (does nothing until manually run); or hold until you're ready to wire the secret.