Merge pull request #76 from zimbatm/no-unstable

only use stable nix commands
This commit is contained in:
Domen Kožar 2021-01-25 13:23:31 +00:00 committed by GitHub
commit 26cfe1ed98
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 3 deletions

2
dist/main/index.js vendored
View file

@ -1071,7 +1071,7 @@ function setup() {
core.exportVariable('CACHIX_SIGNING_KEY', signingKey);
}
// Remember existing store paths
yield exec.exec("sh", ["-c", `nix path-info --all | grep -v '\.drv$' > /tmp/store-path-pre-build`]);
yield exec.exec("sh", ["-c", `${__dirname}/list-nix-store.sh > /tmp/store-path-pre-build`]);
}
catch (error) {
core.setFailed(`Action failed with error: ${error}`);

19
dist/main/list-nix-store.sh vendored Executable file
View file

@ -0,0 +1,19 @@
#!/usr/bin/env bash
# Small utility to replace `nix path-info --all`
set -euo pipefail
for file in /nix/store/*; do
case "$file" in
*.drv)
# Avoid .drv as they are not generally useful
continue
;;
*.check)
# Skip .check file produced by --keep-failed
continue
;;
*)
echo "$file"
;;
esac
done

View file

@ -1,4 +1,4 @@
#!/usr/bin/env bash
set -euo pipefail
comm -13 <(sort /tmp/store-path-pre-build) <(nix path-info --all | grep -v '\.drv$' | sort) | $1 push -j8 $2
comm -13 <(sort /tmp/store-path-pre-build) <("$(dirname "$0")"/list-nix-store.sh) | "$1" push -j8 "$2"