-
-
Notifications
You must be signed in to change notification settings - Fork 250
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3eb5a3f
commit 29df169
Showing
21 changed files
with
433 additions
and
295 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Nix stuff is owned by Rory& - we& want to be notified if these are changed. | ||
/flake.nix [email protected] | ||
/nix-update.sh [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Nix build | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
build-nix: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: cachix/install-nix-action@v25 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
- uses: DeterminateSystems/magic-nix-cache-action@v2 | ||
- run: nix build -L | ||
- run: nix develop --command echo OK |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,4 +18,5 @@ build | |
*.log.ansi | ||
*.tmp | ||
tmp/ | ||
dump/ | ||
dump/ | ||
result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,28 @@ | ||
#!/usr/bin/env sh | ||
#!nix-shell -i "bash" -p bash prefetch-npm-deps jq nodejs nix-output-monitor | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx -y lint-staged | ||
# Check if nix is available | ||
if [ -x "$(/usr/bin/env which nix-shell 2>/dev/null)" ]; then | ||
# Check if we haven't re-executed ourselves yet | ||
if [ ! "$HOOK_NIX_SHELL" ]; then | ||
echo "Nix is available, updating nix flake..." | ||
export HOOK_NIX_SHELL=1 | ||
nix-shell $0 | ||
exit $? | ||
else | ||
nix flake update | ||
# run ./nix-update.sh if package lock has changed and has no unstaged changes | ||
if [ -n "$(git status --porcelain=v1 2>/dev/null | grep -E '^(MM| M) package-lock.json')" ]; then | ||
echo "package-lock.json has unstaged changes. Skipping update of nix dependencies." | ||
elif [ ! -n "$(git status --porcelain=v1 2>/dev/null | grep -E '^M package-lock.json')" ]; then | ||
echo "package-lock.json has no changes. Skipping update of nix dependencies." | ||
else | ||
./nix-update.sh || exit $? | ||
fi | ||
fi | ||
else | ||
echo "You do not appear to have nix installed. Skipping update of nix dependencies." | ||
fi | ||
|
||
npx -y lint-staged |
Empty file.
Empty file.
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.