From ab54bcbbed8ab16daeddcbf9121df451c7775359 Mon Sep 17 00:00:00 2001 From: Benjamin Sherman Date: Thu, 28 Mar 2024 08:32:54 -0500 Subject: [PATCH] chore: fix bad version tag for nvidia (#216) * chore: fix bad version tag for nvidia * chore: more fixes for nvidia_version comparison * chore: trying to just get it working * chore: fjksdfjksdjf * chore: bash hard * fix: maybe add bash for nvidia version equals --- .github/workflows/reusable-build.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 94337aa4..ad0835a6 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -80,15 +80,20 @@ jobs: containers: ${{ matrix.image_name }}-main:${{ matrix.fedora_version }} - name: Matrix Variables + shell: bash run: | if [[ "${{ matrix.hwe_flavor }}" == "main" ]]; then - if "${{ matrix.nvidia_version }}" == "0" ]]; then + if [[ "${{ matrix.nvidia_version }}" == "0" ]]; then echo "this workflow does not build main image without Nvidia drivers" exit 1 fi echo "IMAGE_NAME=${{ matrix.image_name }}-nvidia" >> $GITHUB_ENV else - echo "IMAGE_NAME=${{ matrix.image_name }}-${{ matrix.hwe_flavor }}${{ matrix.nvidia_version != '0' && '-nvidia' || ''}}" >> $GITHUB_ENV + if [[ "${{ matrix.nvidia_version }}" == "0" ]]; then + echo "IMAGE_NAME=${{ matrix.image_name }}-${{ matrix.hwe_flavor }}" >> $GITHUB_ENV + else + echo "IMAGE_NAME=${{ matrix.image_name }}-${{ matrix.hwe_flavor }}-nvidia" >> $GITHUB_ENV + fi fi echo "SOURCE_IMAGE=${{ matrix.image_name }}-main" >> $GITHUB_ENV @@ -98,7 +103,11 @@ jobs: run: | # Generate a timestamp for creating an image version history TIMESTAMP="$(date +%Y%m%d)" - VARIANT="${{ matrix.fedora_version }}${{ matrix.nvidia_version == '0' && '' || format('-{0}', matrix.driver_version) }}" + if [[ "${{ matrix.nvidia_version }}" == "0" ]]; then + VARIANT="${{ matrix.fedora_version }}" + else + VARIANT="${{ matrix.fedora_version }}-${{ matrix.nvidia_version }}" + fi if [[ "${{ matrix.fedora_version }}" -eq "38" ]]; then IS_LATEST_VERSION=false