Skip to content

Commit 09d7084

Browse files
committed
CI: avoid SIGPIPE when selecting core release tag
1 parent 915d0da commit 09d7084

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,11 +255,11 @@ jobs:
255255
GH_TOKEN: ${{ github.token }}
256256
run: |
257257
# --paginate fetches all pages; jq outputs one name per line per page;
258-
# head -1 takes the first (newest) match since GitHub returns tags
259-
# newest-first. Fails hard if no cuda-core-v* tag is found.
258+
# sed prints the first (newest) match while consuming all pages, so
259+
# gh can complete without SIGPIPE. Fails if no cuda-core-v* tag is found.
260260
tag="$(gh api "repos/$GITHUB_REPOSITORY/tags" --paginate \
261261
--jq '.[] | select(.name | startswith("cuda-core-v")) | .name' \
262-
| head -1)"
262+
| sed -n '1p')"
263263
if [[ -z "${tag}" ]]; then
264264
echo "::error::No cuda-core-v* tag found in the repository." >&2
265265
exit 1

0 commit comments

Comments
 (0)