Skip to content

Commit c09e914

Browse files
authored
Merge pull request #384 from leofang/fix_last_commit_fetch
CI: Fix fetching the latest commit from the backport branch
2 parents 57a710a + 9bcf9d6 commit c09e914

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

.github/BACKPORT_BRANCH

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"11.8.x"
1+
11.8.x

.github/workflows/backport.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@ jobs:
3333
copy_labels_pattern: true
3434
copy_requested_reviewers: true
3535
label_pattern: to-be-backported
36-
target_branches: ${{ fromJSON(env.OLD_BRANCH) }}
36+
target_branches: ${{ env.OLD_BRANCH }}
3737
conflict_resolution: draft_commit_conflicts

.github/workflows/test-wheel.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,10 @@ jobs:
111111
OLD_BRANCH=$(cat .github/BACKPORT_BRANCH)
112112
OLD_BASENAME="cuda-bindings-python${PYTHON_VERSION_FORMATTED}-cuda*-${{ inputs.host-platform }}*"
113113
LATEST_PRIOR_RUN_ID=$(gh run list -b ${OLD_BRANCH} -L 1 -w "CI: Build and test" -s completed -R NVIDIA/cuda-python --json databaseId | jq '.[]| .databaseId')
114+
if [[ "$LATEST_PRIOR_RUN_ID" == "" ]]; then
115+
echo "LATEST_PRIOR_RUN_ID not found!"
116+
exit 1
117+
fi
114118
gh run download $LATEST_PRIOR_RUN_ID -p ${OLD_BASENAME} -R NVIDIA/cuda-python
115119
ls -al $OLD_BASENAME
116120
mkdir -p "${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}"

0 commit comments

Comments
 (0)