Skip to content

Commit

Permalink
Add the commit SHA tag during building of precompiled image
Browse files Browse the repository at this point in the history
Signed-off-by: shiva kumar <shivaku@nvidia.com>
  • Loading branch information
shivakunv committed Feb 5, 2025
1 parent ffa25e8 commit 58a451c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/precompiled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ jobs:
exit 0
fi
# Convert array to JSON format and assign
echo "[]" > ./matrix_values_${{ env.COMMIT_SHORT_SHA && format('{0}-', env.COMMIT_SHORT_SHA) }}$DIST.json
printf '%s\n' "${KERNEL_VERSIONS[@]}" | jq -R . | jq -s . > ./matrix_values_${{ env.COMMIT_SHORT_SHA && format('{0}-', env.COMMIT_SHORT_SHA) }}$DIST.json
echo "[]" > ./matrix_values_${COMMIT_SHORT_SHA:+$COMMIT_SHORT_SHA-}$DIST.json
printf '%s\n' "${KERNEL_VERSIONS[@]}" | jq -R . | jq -s . > ./matrix_values_${COMMIT_SHORT_SHA:+$COMMIT_SHORT_SHA-}$DIST.json
- name: Upload kernel matrix values as artifacts
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -253,8 +253,8 @@ jobs:
dist_json='${{ needs.set-driver-version-matrix.outputs.dist }}'
DIST=($(echo "$dist_json" | jq -r '.[]'))
for d in "${DIST[@]}"; do
artifact_name="matrix-values-${{ COMMIT_SHORT_SHA && format('{0}-', COMMIT_SHORT_SHA) }}${d}"
file_path="./matrix_values_${{ COMMIT_SHORT_SHA && format('{0}-', COMMIT_SHORT_SHA) }}${d}.json"
artifact_name="matrix-values-${COMMIT_SHORT_SHA:+$COMMIT_SHORT_SHA-}${d}"
file_path="./matrix_values_${COMMIT_SHORT_SHA:+$COMMIT_SHORT_SHA-}${d}.json"
echo "Attempting to download artifact: $artifact_name"
if gh run download --name "$artifact_name" --dir ./; then
echo "Successfully downloaded artifact: $artifact_name"
Expand Down

0 comments on commit 58a451c

Please sign in to comment.