From 09d7084cdd35250023df0271e20ca593a7ca8988 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Fri, 31 Jul 2026 10:10:34 -0700 Subject: [PATCH] CI: avoid SIGPIPE when selecting core release tag --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 442476ba05e..f36b880beee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -255,11 +255,11 @@ jobs: GH_TOKEN: ${{ github.token }} run: | # --paginate fetches all pages; jq outputs one name per line per page; - # head -1 takes the first (newest) match since GitHub returns tags - # newest-first. Fails hard if no cuda-core-v* tag is found. + # sed prints the first (newest) match while consuming all pages, so + # gh can complete without SIGPIPE. Fails if no cuda-core-v* tag is found. tag="$(gh api "repos/$GITHUB_REPOSITORY/tags" --paginate \ --jq '.[] | select(.name | startswith("cuda-core-v")) | .name' \ - | head -1)" + | sed -n '1p')" if [[ -z "${tag}" ]]; then echo "::error::No cuda-core-v* tag found in the repository." >&2 exit 1