Skip to content

Commit

Permalink
Merge pull request kata-containers#9278 from wainersm/github_env_fix
Browse files Browse the repository at this point in the history
tests: fix nounset error with $GITHUB_ENV
  • Loading branch information
Chelsea Mafrica authored Mar 14, 2024
2 parents b3b00e0 + 981f95d commit 2c50d3c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/integration/kubernetes/gha-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/nerdctl/gha-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 2c50d3c

Please sign in to comment.