Skip to content

ci: repair the vendorHash Dependabot bumps leave stale - #41

Merged
iamralch merged 2 commits into
mainfrom
ci/nix-update-hash
Oct 5, 2026
Merged

iamralch merged 2 commits into
mainfrom
ci/nix-update-hash

Conversation

@iamralch

@iamralch iamralch commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Dependabot's Go module bumps change go.sum but not the vendorHash in flake.nix, so nix build fails on the pull request.

This adds a hash job to ci.yml. It runs only on dependabot/go_modules/… branches, uses nixos-contrib/nix-update-hash to write the correct hash, and pushes it with the App token. That push starts a new CI run, which cancels the stale run through the existing concurrency group. The new run's test and build then pass on the fixed commit. On every other PR and push, the job is skipped.

It's pinned to @main for the trial; it moves to @v1 once the first real bump has been fixed.

Prerequisites

  • Dependabot secrets: APP_CLIENT_ID and APP_PRIVATE_KEY are set as org-level Dependabot secrets ✅
  • A required build check: main has no branch protection, so merge.yml merges a labelled Dependabot PR without waiting for CI. A ruleset that requires the build check makes the PR wait for the fixed hash.

Test plan

Dependabot's Go module bumps change go.sum without the vendorHash in
flake.nix, so nix build fails on the pull request. A hash job in CI runs
nixos-contrib/nix-update-hash on those pull requests and pushes the
corrected hash with the App token; the CI run that push triggers cancels
the stale one through the existing concurrency group.

Pinned to @main until the action's first release.
@iamralch
iamralch force-pushed the ci/nix-update-hash branch from 74f1be7 to b0adbac Compare October 5, 2026 07:08
@iamralch
iamralch enabled auto-merge (squash) October 5, 2026 09:04
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Code Metrics Report

Coverage Test Execution Time
95.6% 45s

Reported by octocov

@iamralch
iamralch merged commit 5bc9217 into main Oct 5, 2026
6 checks passed
@iamralch
iamralch deleted the ci/nix-update-hash branch October 5, 2026 09: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.

1 participant