diff --git a/tests/integration/kubernetes/gha-run.sh b/tests/integration/kubernetes/gha-run.sh index e91bf7b20..5d2afbb34 100755 --- a/tests/integration/kubernetes/gha-run.sh +++ b/tests/integration/kubernetes/gha-run.sh @@ -213,7 +213,7 @@ function run_tests() { # In case of running on Github workflow it needs to save the start time # on the environment variables file so that the variable is exported on # next workflow steps. - if [ -n "$GITHUB_ENV" ]; then + if [ -n "${GITHUB_ENV:-}" ]; then start_time=$(date '+%Y-%m-%d %H:%M:%S') export start_time echo "start_time=${start_time}" >> "$GITHUB_ENV" diff --git a/tests/integration/nerdctl/gha-run.sh b/tests/integration/nerdctl/gha-run.sh index e762b760d..7b3c42a36 100644 --- a/tests/integration/nerdctl/gha-run.sh +++ b/tests/integration/nerdctl/gha-run.sh @@ -95,7 +95,7 @@ function run() { enabling_hypervisor - if [ -n "$GITHUB_ENV" ]; then + if [ -n "${GITHUB_ENV:-}" ]; then start_time=$(date '+%Y-%m-%d %H:%M:%S') export start_time echo "start_time=${start_time}" >> "$GITHUB_ENV"