feat(nix): add nix-update-hash reusable workflow#75
Merged
Conversation
Reusable workflow_call action that updates the vendorHash in flake.nix when Go dependencies change and opens a PR targeting the triggering branch, so the hash fix lands in the same review as the dep update.
savme
approved these changes
Jun 2, 2026
drewr
added a commit
that referenced
this pull request
Jun 3, 2026
## Summary Follows up on #75 — the original PR used `peter-evans/create-pull-request` which opened a separate PR targeting `main`. That's wrong: `go.mod` should never change directly on `main`, so the workflow will always be triggered from a feature or Renovate branch where a direct `git push` is permitted. - Replaces `peter-evans/create-pull-request` with a direct `git push` back to the triggering branch - Removes the now-unnecessary `pr-branch`, `pr-title`, and `pr-body` inputs - Drops `pull-requests: write` permission — only `contents: write` is needed - Updates docs to reflect the push-based approach and note that this workflow should not be triggered on `main`
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.
Summary
.github/workflows/nix-update-hash.yamlas a reusableworkflow_callaction that updatesvendorHashinflake.nixwhen Go dependencies changebase: ${{ github.ref_name }}), so the hash fix travels with the dependency update rather than landing separately onmaindocs/nix-update-hash/README.mddocumenting inputs, prerequisites (caller must provide aTaskfile.ymland update script), and usage exampleRelated
Extracted from datum-cloud/datumctl#199 as part of standardising this pattern across repos.