Skip to content

Commit 73c842b

Browse files
committed
chore(ci): Improve download script logging and try to make it work with ancient gh version
1 parent 0886d5a commit 73c842b

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

.github/scripts/download-iota-binary.sh

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,19 @@ os_type="${os_name}-${arch_name}"
1212

1313
gh --version
1414

15-
run_id=$(gh run list --repo iotaledger/iota --workflow=release.yml \
16-
--status=success --limit=20 \
17-
--json databaseId,event \
18-
--jq '[.[] | select(.event == "schedule")] | .[0].databaseId')
15+
run_info=$(gh run list --repo iotaledger/iota --workflow=release.yml \
16+
--limit=20 \
17+
--json databaseId,event,conclusion,createdAt \
18+
--jq '[.[] | select(.event == "schedule" and .conclusion == "success")] | .[0] | "\(.databaseId) \(.createdAt)"')
19+
run_id="${run_info% *}"
20+
run_created="${run_info#* }"
21+
echo "Using iotaledger/iota release.yml run $run_id (created $run_created)"
1922

2023
gh run download "$run_id" --repo iotaledger/iota \
2124
--pattern "iota-nightly-*-${os_type}" --dir .
2225

2326
tar -zxvf iota-nightly-*-"${os_type}"/*.tgz
2427
chmod +x ./iota ./iota-localnet ./iota-indexer ./iota-graphql-rpc
25-
echo "$(pwd)" >> "$GITHUB_PATH"
28+
echo "$(pwd)" >> "${GITHUB_PATH:-/dev/null}"
29+
echo "IOTA nightly from run $run_id installed"
30+

0 commit comments

Comments
 (0)