ci: update-maintainers fetch nixpkgs from flake.lock rev

We need a nixpkgs on NIX_PATH. Right now we have been using the latest
from channel. But, we can actually just fetch the nixpkgs from our
flake.lock by parsing the flake.lock.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
Austin Horstman
2025-07-01 18:20:46 -05:00
parent 121b430df7
commit 212f4a4fb2

View File

@@ -38,8 +38,14 @@ jobs:
uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token }}
- name: Get Nixpkgs revision from flake.lock
id: get-nixpkgs
run: |
echo "rev=$(jq -r '.nodes.nixpkgs.locked.rev' flake.lock)" >> "$GITHUB_OUTPUT"
- name: Install Nix
uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=https://github.com/NixOS/nixpkgs/archive/${{ steps.get-nixpkgs.outputs.rev }}.tar.gz
- name: Setup Git
run: |
git config user.name "${{ steps.user-info.outputs.name }}"