From 6e29591c341152d33320759c0e59aa08c73e394b Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Wed, 17 Jun 2026 17:46:49 -0500 Subject: [PATCH] Drop --paginate from nightly marker lookup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With --paginate, gh runs the jq aggregation per page and concatenates, so sort_by | last ran per-page and extra workflow_dispatch runs could push past per_page=100 and emit two URLs — which would break the curl download. The artifacts API returns results newest-first, so the most recent marker is always on page 1. Drop --paginate and take first(non-expired), which emits exactly one URL (or none) by construction. Co-Authored-By: Claude Opus 4.8 --- .github/workflows/nightly-build.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml index b9e6ea0a91..9fe0ce8bfc 100644 --- a/.github/workflows/nightly-build.yml +++ b/.github/workflows/nightly-build.yml @@ -35,10 +35,13 @@ jobs: GH_TOKEN: ${{ github.token }} run: | # Find the most recent non-expired nightly-build-commit artifact and read its SHA + # The artifacts API returns results newest-first, so the most recent marker is on + # page 1 — no --paginate needed (which would run the jq aggregation per page and + # could emit multiple URLs). Take the first non-expired match. prev="" - url=$(gh api --paginate \ + url=$(gh api \ "repos/${GITHUB_REPOSITORY}/actions/artifacts?name=nightly-build-commit&per_page=100" \ - --jq '[.artifacts[] | select(.expired == false)] | sort_by(.created_at) | last | .archive_download_url' \ + --jq 'first(.artifacts[] | select(.expired == false)) | .archive_download_url' \ 2>/dev/null || true) if [ -n "$url" ] && [ "$url" != "null" ]; then if curl -sSL -H "Authorization: Bearer $GH_TOKEN" -o marker.zip "$url" \