From d195d799bd6ab7272633fbe468fdc399d2459684 Mon Sep 17 00:00:00 2001 From: aimixsaka Date: Fri, 26 Jul 2024 15:13:05 +0800 Subject: [PATCH] fix(nix ci): action can only use one `uses` in one step --- .github/workflows/udpate-nix-npm-dep.yml | 1 - update-nix-npm-dep.sh | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/udpate-nix-npm-dep.yml b/.github/workflows/udpate-nix-npm-dep.yml index 6e426b9..7f01063 100644 --- a/.github/workflows/udpate-nix-npm-dep.yml +++ b/.github/workflows/udpate-nix-npm-dep.yml @@ -18,7 +18,6 @@ jobs: - name: update package-lock.json and npmDepsHash uses: cachix/install-nix-action@v27 - uses: actions/setup-node@v4 run: ./update-nix-npm-dep.sh - name: create github pr diff --git a/update-nix-npm-dep.sh b/update-nix-npm-dep.sh index 26300ac..3289469 100755 --- a/update-nix-npm-dep.sh +++ b/update-nix-npm-dep.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash # script help to update package-lock.json and nix flake npmDepsHash -npm i --package-lock-only +nix shell nixpkgs#nodePackages.npm nixpkgs#husky --command npm i --package-lock-only sed -i "s|npmDepsHash = \".*\";|npmDepsHash = \"$(nix run nixpkgs#prefetch-npm-deps package-lock.json | tail -1)\";|" flake.nix