mirror of
https://github.com/moeru-ai/airi.git
synced 2026-08-14 00:48:06 +00:00
feat(nix): auto-update pnpmDeps hash (#490)
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
name: Update Nix pnpmDeps Hash
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'pnpm-lock.yaml'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
update:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: cachix/install-nix-action@v31
|
||||
with:
|
||||
extra_nix_config: experimental-features = nix-command flakes
|
||||
|
||||
- name: Update Hash
|
||||
run: nix/update-pnpm-deps-hash.sh
|
||||
|
||||
- uses: stefanzweifel/git-auto-commit-action@v6
|
||||
with:
|
||||
commit_message: 'chore(nix): update pnpmDeps hash'
|
||||
commit_author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
|
||||
@@ -23,14 +23,14 @@
|
||||
|
||||
packages = forAllSystems (system: {
|
||||
default = self.packages.${system}.airi;
|
||||
airi = (pkgsForSystem system).callPackage ./package.nix { };
|
||||
airi-debug = (pkgsForSystem system).callPackage ./package.nix { debugBuild = true; };
|
||||
airi = (pkgsForSystem system).callPackage ./nix/package.nix { };
|
||||
airi-debug = (pkgsForSystem system).callPackage ./nix/package.nix { debugBuild = true; };
|
||||
});
|
||||
|
||||
overlays = {
|
||||
default = self.overlays.airi;
|
||||
airi = final: _: {
|
||||
airi = final.callPackage ./package.nix { };
|
||||
airi = final.callPackage ./nix/package.nix { };
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -29,17 +29,17 @@ rustPlatform.buildRustPackage (final: {
|
||||
pname = "airi";
|
||||
version = "0.7.2-beta.2";
|
||||
|
||||
src = ./.;
|
||||
src = ../.;
|
||||
|
||||
cargoLock = {
|
||||
lockFile = ./Cargo.lock;
|
||||
lockFile = ../Cargo.lock;
|
||||
outputHashes."rdev-0.6.0" = "sha256-mGt44/kVo5EJO1Wf6MPLq0sZgwGTzuQjeVT6HxVzpQY=";
|
||||
};
|
||||
|
||||
pnpmDeps = pnpm.fetchDeps {
|
||||
inherit (final) pname version src;
|
||||
fetcherVersion = 1;
|
||||
hash = "sha256-y28rG+9NADUdwdjIAkYCqmYOKLoEWosAOpiGM4JPQoQ="; # To update, set it to ""
|
||||
hash = builtins.readFile ./pnpm-deps-hash.txt;
|
||||
};
|
||||
|
||||
# Cache of assets downloaded during vite build
|
||||
@@ -0,0 +1 @@
|
||||
sha256-NOtKBXFu/eIVcCNjsizlF3t/6f+izx3cRdU7HbjW0cM=
|
||||
Executable
+9
@@ -0,0 +1,9 @@
|
||||
#! /usr/bin/env bash
|
||||
|
||||
set -eux
|
||||
|
||||
ROOT="$(dirname "$(readlink -f "$0")")"
|
||||
|
||||
:> "$ROOT/pnpm-deps-hash.txt" # Clear hash
|
||||
HASH=$(nix build "$ROOT/..#airi.pnpmDeps" |& grep -oP 'got: +\K\S+')
|
||||
echo -n $HASH > "$ROOT/pnpm-deps-hash.txt"
|
||||
Reference in New Issue
Block a user