run the shell profile and save the env

This commit is contained in:
Sander 2025-07-29 17:32:36 +02:00
parent 96bd9f39e4
commit 5825a39447
No known key found for this signature in database

View file

@ -107,10 +107,10 @@ done
sh "$workdir/install" "${installer_options[@]}" sh "$workdir/install" "${installer_options[@]}"
# Set paths # # Set paths
echo "/nix/var/nix/profiles/default/bin" >> "$GITHUB_PATH" # echo "/nix/var/nix/profiles/default/bin" >> "$GITHUB_PATH"
# new path for nix 2.14 # # new path for nix 2.14
echo "$HOME/.nix-profile/bin" >> "$GITHUB_PATH" # echo "$HOME/.nix-profile/bin" >> "$GITHUB_PATH"
if [[ -n "${INPUT_NIX_PATH:-}" ]]; then if [[ -n "${INPUT_NIX_PATH:-}" ]]; then
echo "NIX_PATH=${INPUT_NIX_PATH}" >> "$GITHUB_ENV" echo "NIX_PATH=${INPUT_NIX_PATH}" >> "$GITHUB_ENV"
@ -121,5 +121,7 @@ if [[ -z "${TMPDIR:-}" ]]; then
echo "TMPDIR=${RUNNER_TEMP}" >> "$GITHUB_ENV" echo "TMPDIR=${RUNNER_TEMP}" >> "$GITHUB_ENV"
fi fi
comm -13 <(env | sort) <(bash /etc/profile.d/nix.sh && env | sort) > "$GITHUB_ENV"
# Close the log message group which was opened above # Close the log message group which was opened above
echo "::endgroup::" echo "::endgroup::"