amoeba commented on code in PR #50364:
URL: https://github.com/apache/arrow/pull/50364#discussion_r3521853322
##########
dev/release/utils-watch-gh-workflow.sh:
##########
@@ -21,33 +21,43 @@ set -e
set -u
set -o pipefail
-if [ "$#" -ne 2 ]; then
- echo "Usage: $0 <tag> <workflow>"
+if [ "$#" -lt 2 ] || [ "$#" -gt 3 ]; then
+ echo "Usage: $0 <tag> <workflow> [run-id]"
exit 1
fi
TAG=$1
WORKFLOW=$2
+RUN_ID="${3:-}"
: "${REPOSITORY:=${GITHUB_REPOSITORY:-apache/arrow}}"
-echo "Looking for GitHub Actions workflow on ${REPOSITORY}:${TAG}"
-RUN_ID=""
-while true; do
- echo "Waiting for run to start..."
- RUN_ID=$(gh run list \
- --branch "${TAG}" \
- --jq '.[].databaseId' \
- --json databaseId \
- --limit 1 \
- --repo "${REPOSITORY}" \
- --workflow "${WORKFLOW}")
- if [ -n "${RUN_ID}" ]; then
- break
- fi
- sleep 60
-done
+if [ -z "${RUN_ID}" ]; then
+ echo "Looking for GitHub Actions workflow on ${REPOSITORY}:${TAG} (any ID)"
+else
+ echo "Looking for GitHub Actions workflow on ${REPOSITORY}:${TAG} with run
ID ${RUN_ID}"
+fi
+if [ -z "${RUN_ID}" ]; then
+ while true; do
+ echo "Waiting for run to start..."
+ RUN_ID=$(gh run list \
+ --branch "${TAG}" \
+ --jq '.[].databaseId' \
Review Comment:
I don't think this complication is worth it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]