@@ -17,22 +17,27 @@ chmod a+x bin/regctl
1717export PATH=$( pwd) /bin:${PATH}
1818
1919# calculate kernel version of latest image
20- # regctl image get-file ghcr.io/nvidia/driver:base-${BASE_TARGET}-${KERNEL_FLAVOR}-${DRIVER_BRANCH} /var/kernel_version.txt ./kernel_version.txt || true
20+ echo -e " SHIVA1 ${BASE_TARGET} -${KERNEL_FLAVOR} -${DRIVER_BRANCH} "
21+ regctl image get-file ghcr.io/nvidia/driver:base-${BASE_TARGET} -${KERNEL_FLAVOR} -${DRIVER_BRANCH} /var/kernel_version.txt ./kernel_version.txt 2> /dev/null || true
2122if [[ -f ./kernel_version.txt && -s ./kernel_version.txt ]]; then
2223 # File exists and is not empty
24+ echo -e " SHIVA2 "
2325 export $( grep -oP ' KERNEL_VERSION=[^ ]+' ./kernel_version.txt)
2426 rm -f kernel_version.txt
2527else
2628 # Define variables for artifact pattern
2729 prefix=" kernel-version-${DRIVER_BRANCH} -${LTS_KERNEL} "
2830 suffix=" ${kernel_flavor} -${DIST} "
2931 artifacts=$( gh api -X GET /repos/${GITHUB_REPOSITORY} /actions/runs/${GITHUB_RUN_ID} /artifacts --jq ' .artifacts[].name' )
32+ echo -e " SHIVA2 $artifacts "
3033 # Use a loop or a pattern to find the matching artifact dynamically
3134 for artifact in $artifacts ; do
35+ echo -e " SHIVA2 $artifact "
3236 if [[ $artifact == $prefix * -$suffix ]]; then
3337 gh run download --name " $artifact " --dir ./
3438 tar -xvf $artifact .tar
3539 rm -f $artifact .tar
40+ cat ./kernel_version.txt
3641 export $( grep -oP ' KERNEL_VERSION=[^ ]+' ./kernel_version.txt)
3742 rm -f kernel_version.txt
3843 export should_continue=true
6671
6772# calculate driver tag
6873status=0
74+ echo -e " SHIVA4"
6975regctl tag ls nvcr.io/nvidia/driver | grep " ^${DRIVER_BRANCH} -${KERNEL_VERSION} -${DIST} $" || status=$?
76+ echo -e " SHIVA5"
7077if [[ $status -eq 0 ]]; then
7178 export should_continue=false
7279else
0 commit comments