Skip to content

Commit fb66281

Browse files
committed
CI was failing since gh command only finds the past 30 artifact ids by default, this lists them all
1 parent 3f89b7c commit fb66281

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/ci_run_scm_rts.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,9 @@ jobs:
186186
- name: Save Artifact Id Numbers and Create Directory for SCM RT baselines
187187
run: |
188188
mkdir -p ${dir_bl}
189-
ARTIFACT_ID=$(gh api \
190-
repos/NCAR/ccpp-scm/actions/artifacts \
191-
--jq '[.artifacts[] | select(.name == "rt-baselines-${{matrix.build-type}}-main" and (.expired | not))] | sort_by(.created_at) | last | .workflow_run | .id ')
189+
ARTIFACT_ID=$(gh api --paginate \
190+
repos/NCAR/ccpp-scm/actions/artifacts | \
191+
jq -s '[ .[] | .artifacts[] | select(.name == "rt-baselines-${{matrix.build-type}}-main" and (.expired | not))] | sort_by(.created_at) | last | .workflow_run | .id ')
192192
echo "artifact_id=${ARTIFACT_ID}"
193193
echo "artifact_id=${ARTIFACT_ID}" >> "$GITHUB_ENV"
194194

0 commit comments

Comments
 (0)