From 1e7a7d92f3115df7d5dbb0e882be9daab628aa62 Mon Sep 17 00:00:00 2001 From: Pavel Abramov Date: Mon, 23 Oct 2023 14:17:11 +0200 Subject: [PATCH] GitHub Actions: fix set up eve version step to work with no eve_img Signed-off-by: Pavel Abramov --- .github/actions/setup-environment/action.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/actions/setup-environment/action.yml b/.github/actions/setup-environment/action.yml index 368c3190e..4b520e200 100644 --- a/.github/actions/setup-environment/action.yml +++ b/.github/actions/setup-environment/action.yml @@ -50,13 +50,17 @@ runs: shell: bash working-directory: "./eden" - name: Setup eve version - if: ${{ inputs.eve_image != '' }} and contains(${{ inputs.eve_image }}, ":" ) run: | image=${{ inputs.eve_image }} - eve_pr_registry=$(echo "$image" | cut -d ':' -f 1) - eve_pr=$(echo "$image" | cut -d ':' -f 2 | cut -d "-" -f1) - ./eden config set default --key=eve.registry --value="$eve_pr_registry" - ./eden config set default --key=eve.tag --value="$eve_pr" + if [[ -n "$image" && "$image" == *:* ]]; then + echo "Setting up eve image ${image}" + eve_pr_registry=$(echo "$image" | cut -d ':' -f 1) + eve_pr=$(echo "$image" | cut -d ':' -f 2 | cut -d "-" -f1) + ./eden config set default --key=eve.registry --value="$eve_pr_registry" + ./eden config set default --key=eve.tag --value="$eve_pr" + else + echo "Skipping setting up eve image ${image}" + fi shell: bash working-directory: "./eden" - name: Setup ext4