Skip to content

feat(nix): add nix-update-hash reusable workflow#75

Merged
drewr merged 1 commit into
mainfrom
feat/nix-update-hash
Jun 2, 2026
Merged

feat(nix): add nix-update-hash reusable workflow#75
drewr merged 1 commit into
mainfrom
feat/nix-update-hash

Conversation

@drewr

@drewr drewr commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds .github/workflows/nix-update-hash.yaml as a reusable workflow_call action that updates vendorHash in flake.nix when Go dependencies change
  • Opens a PR targeting the triggering branch (base: ${{ github.ref_name }}), so the hash fix travels with the dependency update rather than landing separately on main
  • Adds docs/nix-update-hash/README.md documenting inputs, prerequisites (caller must provide a Taskfile.yml and update script), and usage example

Related

Extracted from datum-cloud/datumctl#199 as part of standardising this pattern across repos.

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.
@drewr drewr merged commit e07b3de into main Jun 2, 2026
2 of 3 checks passed
@drewr drewr deleted the feat/nix-update-hash branch June 2, 2026 18:31
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`
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