Skip to content

Commit

Permalink
chore: fix bad version tag for nvidia (#216)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
bsherman authored Mar 28, 2024
1 parent 7056d09 commit ab54bcb
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/reusable-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit ab54bcb

Please sign in to comment.