Adds a CI job that runs `nix build .#default` on PRs touching go.mod, go.sum, default.nix, flake.nix, or flake.lock, so dependabot bumps that invalidate vendorHash fail loudly in CI instead of silently breaking Nix users on main (as happened in GH#3221). Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
31 lines
616 B
YAML
31 lines
616 B
YAML
name: nix build
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- 'go.mod'
|
|
- 'go.sum'
|
|
- 'default.nix'
|
|
- 'flake.nix'
|
|
- 'flake.lock'
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'go.mod'
|
|
- 'go.sum'
|
|
- 'default.nix'
|
|
- 'flake.nix'
|
|
- 'flake.lock'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
nix-build:
|
|
name: nix build .#default
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v6
|
|
- name: Install Nix
|
|
uses: DeterminateSystems/determinate-nix-action@v3
|
|
- name: Build
|
|
run: nix build .#default --print-build-logs
|