diff --git a/.github/node_upgrade.sh b/.github/node_upgrade.sh index 989fb1a8a..9e707fd1c 100755 --- a/.github/node_upgrade.sh +++ b/.github/node_upgrade.sh @@ -15,10 +15,6 @@ if [[ -z "${BASE_TAR_URL:-}" && -z "${BASE_REVISION:-}" ]]; then exit 1 fi -if [ -n "${GITHUB_ACTIONS:-}" ]; then - CI_OPTIMIZE_SPACE="${CI_OPTIMIZE_SPACE:-"true"}" -fi - nix --version df -h . @@ -104,8 +100,8 @@ fi export PATH_PREPEND_BASE export PATH_PREPEND_UPGRADE -# optimize nix store space if requested -if [ "${CI_OPTIMIZE_SPACE:-"false"}" != "false" ]; then +# optimize nix store if running in GitHub Actions +if [ -n "${GITHUB_ACTIONS:-}" ]; then nix store gc || : fi diff --git a/.github/regression.sh b/.github/regression.sh index ff96b6731..9fd58a796 100755 --- a/.github/regression.sh +++ b/.github/regression.sh @@ -8,10 +8,6 @@ basic_err_string='echo "Error at line $LINENO"' # shellcheck disable=SC2064 trap "$basic_err_string" ERR -if [ -n "${GITHUB_ACTIONS:-}" ]; then - CI_OPTIMIZE_SPACE="${CI_OPTIMIZE_SPACE:-"true"}" -fi - nix --version df -h . @@ -163,8 +159,8 @@ cardano_bins_build_all "$NODE_REV" "${CARDANO_CLI_REV:-}" PATH_PREPEND="$(cardano_bins_print_path_prepend "${CARDANO_CLI_REV:-}")${PATH_PREPEND}" export PATH_PREPEND -# optimize nix store space if requested -if [ "${CI_OPTIMIZE_SPACE:-"false"}" != "false" ]; then +# optimize nix store if running in GitHub Actions +if [ -n "${GITHUB_ACTIONS:-}" ]; then nix store gc || : fi