From 5f66d4313a28cdbdca75762b28eeb682cbc3531c Mon Sep 17 00:00:00 2001 From: Vicente Cheng Date: Fri, 27 Sep 2024 01:05:03 +0800 Subject: [PATCH] ci: make sure the if-condition works Signed-off-by: Vicente Cheng --- .github/workflows/basic-ci.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/basic-ci.yaml b/.github/workflows/basic-ci.yaml index 55bf4b49..8e0f0ec9 100644 --- a/.github/workflows/basic-ci.yaml +++ b/.github/workflows/basic-ci.yaml @@ -11,6 +11,7 @@ on: env: LIBVIRT_DEFAULT_URI: "qemu:///system" + VM_DEPLOYED: false jobs: validation: @@ -46,6 +47,7 @@ jobs: pushd ndm-vagrant-k3s yq e -i ".cluster_size = 1" settings.yaml ./new-cluster.sh + echo "VM_DEPLOYED=true" >> "$GITHUB_ENV" yq e -i ".longhorn_version = \"1.7.1\"" settings.yaml ./scripts/deploy_longhorn.sh cp ../ci/scripts/deploy_ndm.sh ./deploy_ndm.sh @@ -78,11 +80,11 @@ jobs: echo Running integration tests NDM_HOME=`pwd` go test -v ./tests/... - name: "Get NDM logs" - if: steps.vm_deploy.conclusion == 'success' + if: ${{ env.VM_DEPLOYED == 'true' }} run: | ./ci/scripts/get-debug-info.sh - name: "Tear Down / Cleanup" - if: steps.vm_deploy.conclusion == 'success' + if: ${{ env.VM_DEPLOYED == 'true' }} run: | pushd ndm-vagrant-k3s vagrant destroy -f --parallel