Skip to content

Commit

Permalink
include nvd diff in niv-update commits
Browse files Browse the repository at this point in the history
  • Loading branch information
jerith666 committed Jul 12, 2023
1 parent 2ac4861 commit 6af39d3
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
23 changes: 21 additions & 2 deletions .github/workflows/niv-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,31 @@ jobs:
- uses: cachix/install-nix-action@v18
with:
nix_path: nixpkgs=channel:nixos-unstable
- run: nix-shell nix/niv-shell.nix --run 'niv update'
- run: |
nix-build -o old
nix-build shell.nix -A inputDerivation -o shell-old
nix-shell nix/niv-shell.nix --run 'niv update'
nix-build -o new
nix-build shell.nix -A inputDerivation -o shell-new
echo "update nix dependencies with niv-update" >> msg
echo >> msg
echo "* changes to nix-build output:" >> msg
echo >> msg
nix-shell nix/niv-shell.nix --run 'nvd diff old new' | tail +3 >> msg
echo >> msg
echo "* changes to nix-shell output:" >> msg
echo >> msg
nix-shell nix/niv-shell.nix --run 'nvd diff shell-old shell-new' | tail +3 >> msg
echo "COMMIT_MSG<<COMMIT_EOF" >> "$GITHUB_ENV"
cat msg >> "$GITHUB_ENV"
echo "COMMIT_EOF" >> "$GITHUB_ENV"
rm msg old new shell-old shell-new
- uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.ELBUM_BOT_REPOS_WORKFLOWS }}
push-to-fork: Elbum-Bot/elbum
branch: niv/auto-update
author: Nix Updater Bot <[email protected]>
commit-message: update nix dependencies with niv-update
commit-message: "${{ env.COMMIT_MSG }}"
body: "${{ env.COMMIT_MSG }}"
title: update nix dependencies with niv-update
2 changes: 2 additions & 0 deletions nix/niv-shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,7 @@ nixpkgs.pkgs.stdenv.mkDerivation {
buildInputs = with nixpkgs.pkgs;
[
niv
nix
nvd
];
}

0 comments on commit 6af39d3

Please sign in to comment.