mirror of
https://github.com/nix-community/naersk
synced 2024-09-20 14:11:53 +00:00
install-nix: fix shellcheck warnings
This commit is contained in:
parent
ee7edec50b
commit
3d3542a3fe
1 changed files with 4 additions and 3 deletions
7
.github/actions/nix/install-nix
vendored
7
.github/actions/nix/install-nix
vendored
|
@ -13,7 +13,7 @@ install_nix() {
|
||||||
# Allow binary caches for runner user
|
# Allow binary caches for runner user
|
||||||
sudo sh -c 'echo trusted-users = root runner >> /tmp/nix.conf'
|
sudo sh -c 'echo trusted-users = root runner >> /tmp/nix.conf'
|
||||||
|
|
||||||
sh <(curl -L ${INPUT_INSTALL_URL:-https://nixos.org/nix/install}) \
|
sh <(curl -L "${INPUT_INSTALL_URL:-https://nixos.org/nix/install}") \
|
||||||
--daemon --daemon-user-count 4 --nix-extra-conf-file /tmp/nix.conf --darwin-use-unencrypted-nix-store-volume --no-channel-add
|
--daemon --daemon-user-count 4 --nix-extra-conf-file /tmp/nix.conf --darwin-use-unencrypted-nix-store-volume --no-channel-add
|
||||||
|
|
||||||
if [[ $OSTYPE =~ darwin ]]; then
|
if [[ $OSTYPE =~ darwin ]]; then
|
||||||
|
@ -30,6 +30,7 @@ install_nix() {
|
||||||
# Set paths
|
# Set paths
|
||||||
echo "/nix/var/nix/profiles/per-user/runner/profile/bin" >>"$GITHUB_PATH"
|
echo "/nix/var/nix/profiles/per-user/runner/profile/bin" >>"$GITHUB_PATH"
|
||||||
echo "/nix/var/nix/profiles/default/bin" >>"$GITHUB_PATH"
|
echo "/nix/var/nix/profiles/default/bin" >>"$GITHUB_PATH"
|
||||||
|
# shellcheck disable=SC1091
|
||||||
. '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
|
. '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,7 +48,7 @@ install_cachix() {
|
||||||
cachix use "$cachix_cache"
|
cachix use "$cachix_cache"
|
||||||
|
|
||||||
script_path="$HOME/.local/bin/save-cache"
|
script_path="$HOME/.local/bin/save-cache"
|
||||||
mkdir -p "$(dirname $script_path)"
|
mkdir -p "$(dirname "$script_path")"
|
||||||
}
|
}
|
||||||
|
|
||||||
save_cache() {
|
save_cache() {
|
||||||
|
@ -66,7 +67,7 @@ save_cache() {
|
||||||
if [ -n "${CACHIX_SIGNING_KEY:-}" ];
|
if [ -n "${CACHIX_SIGNING_KEY:-}" ];
|
||||||
then
|
then
|
||||||
echo "CACHIX_SIGNING_KEY is set, uploading cache"
|
echo "CACHIX_SIGNING_KEY is set, uploading cache"
|
||||||
nix path-info --all | grep -v '.*.drv$' | cachix push $cachix_cache
|
nix path-info --all | grep -v '.*.drv$' | cachix push "$cachix_cache"
|
||||||
else
|
else
|
||||||
echo "CACHIX_SIGNING_KEY not set, not uploading cache"
|
echo "CACHIX_SIGNING_KEY not set, not uploading cache"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue