From d7c1a7f0604c4a23eebd42f14a81e0d66a088841 Mon Sep 17 00:00:00 2001 From: Paul Gessinger Date: Tue, 7 Jan 2025 16:59:49 +0100 Subject: [PATCH] fix bash ifs --- .github/workflows/spack.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/spack.yml b/.github/workflows/spack.yml index 2c56128..9ed8bf6 100644 --- a/.github/workflows/spack.yml +++ b/.github/workflows/spack.yml @@ -95,7 +95,7 @@ jobs: export TARGET_TRIPLET="${arch}_${{ inputs.compiler }}" echo "TARGET_TRIPLET=${TARGET_TRIPLET}" >> "$GITHUB_ENV" cp spack.lock "spack_${TARGET_TRIPLET}.lock" - if [ "${{ inputs.default }}" == "true" ]; then + if [[ "${{ inputs.default }}" == "true" ]]; then # this will be become the default combination for this architecture cp spack.lock "spack_${arch}.lock" fi @@ -126,11 +126,11 @@ jobs: GH_OCI_USER: "${{ github.actor }}" GH_OCI_TOKEN: "${{ secrets.GITHUB_TOKEN }}" run: | - if [ "${{ inputs.image }}" != "" ]; then + if [[ "${{ inputs.image }}" != "" ]]; then export BASE_IMAGE="${{ inputs.image }}" - elif [ "${{ inputs.os }}" == "ubuntu-22.04" ]; then + elif [[ "${{ inputs.os }}" == "ubuntu-22.04" ]]; then export BASE_IMAGE="ubuntu:22.04" - elif [ "${{ inputs.os }}" == "ubuntu-24.04" ]; then + elif [[ "${{ inputs.os }}" == "ubuntu-24.04" ]]; then export BASE_IMAGE="ubuntu:24.04" else export BASE_IMAGE="ubuntu:24.04"