Skip to content

Commit 486ffb0

Browse files
authored
Merge pull request #6159 from IntersectMBO/jl/gh-api-paginate
CI github api pagination handling
2 parents 615800f + cccf8f1 commit 486ffb0

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.github/workflows/release-ghcr.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
run: |
3030
while [[ true ]]; do
3131
check_name='ci/hydra-build:required'
32-
conclusion=$(gh api "repos/$GITHUB_REPOSITORY/commits/$GITHUB_SHA/check-runs?check_name=$check_name" --jq '.check_runs[].conclusion')
32+
conclusion=$(gh api "repos/$GITHUB_REPOSITORY/commits/$GITHUB_SHA/check-runs?check_name=$check_name" --paginate --jq '.check_runs[].conclusion')
3333
case "$conclusion" in
3434
success)
3535
echo "$check_name succeeded"
@@ -88,7 +88,7 @@ jobs:
8888
- name: Obtaining latest release tag
8989
id: latest-tag
9090
run: |
91-
LATEST_TAG=$(gh api repos/$GITHUB_REPOSITORY/releases/latest --jq '.tag_name')
91+
LATEST_TAG=$(gh api repos/$GITHUB_REPOSITORY/releases/latest --paginate --jq '.tag_name')
9292
echo "LATEST_TAG=$LATEST_TAG" >> "$GITHUB_OUTPUT"
9393
echo "Latest release tag is: $LATEST_TAG"
9494

.github/workflows/release-upload.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
run: |
3030
while [[ true ]]; do
3131
check_name='ci/hydra-build:required'
32-
conclusion=$(gh api "repos/$GITHUB_REPOSITORY/commits/$GITHUB_SHA/check-runs?check_name=$check_name" --jq '.check_runs[].conclusion')
32+
conclusion=$(gh api "repos/$GITHUB_REPOSITORY/commits/$GITHUB_SHA/check-runs?check_name=$check_name" --paginate --jq '.check_runs[].conclusion')
3333
case "$conclusion" in
3434
success)
3535
echo "$check_name succeeded"
@@ -42,7 +42,7 @@ jobs:
4242
exit 1;;
4343
esac
4444
done
45-
45+
4646
pull:
4747
needs: [wait-for-hydra]
4848
strategy:
@@ -77,11 +77,11 @@ jobs:
7777
win64)
7878
nix build --builders "" --max-jobs 0 ${{ steps.flake-metadata.outputs.LOCKED_URL }}#hydraJobs.x86_64-linux.windows.cardano-node-win64
7979
cp result/cardano-node-*-*.zip .
80-
;;
80+
;;
8181
esac
8282
- uses: actions/upload-artifact@v4
8383
with:
84-
name: ${{ github.sha }}-${{ matrix.arch }}
84+
name: ${{ github.sha }}-${{ matrix.arch }}
8585
path: cardano-node-*-*.*
8686
retention-days: 1
8787

0 commit comments

Comments
 (0)