mirror of
https://github.com/kamilchodola/wait-for-workflow-action.git
synced 2026-04-30 08:07:38 -05:00
Move log inside while loop
This commit is contained in:
@@ -28,8 +28,8 @@ else
|
|||||||
echo "ℹ️ Workflow ID: $workflow_id"
|
echo "ℹ️ Workflow ID: $workflow_id"
|
||||||
|
|
||||||
# Wait for the workflow to be triggered
|
# Wait for the workflow to be triggered
|
||||||
echo "⏳ Waiting for the workflow to be triggered..."
|
|
||||||
while true; do
|
while true; do
|
||||||
|
echo "⏳ Waiting for the workflow to be triggered..."
|
||||||
response=$(curl -s -H "Accept: application/vnd.github+json" -H "Authorization: token $GITHUB_TOKEN" \
|
response=$(curl -s -H "Accept: application/vnd.github+json" -H "Authorization: token $GITHUB_TOKEN" \
|
||||||
"https://api.github.com/repos/${ORG_NAME}/${REPO_NAME}/actions/workflows/${workflow_id}/runs")
|
"https://api.github.com/repos/${ORG_NAME}/${REPO_NAME}/actions/workflows/${workflow_id}/runs")
|
||||||
if echo "$response" | grep -q "API rate limit exceeded"; then
|
if echo "$response" | grep -q "API rate limit exceeded"; then
|
||||||
@@ -59,8 +59,8 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Wait for the triggered workflow to complete and check its conclusion
|
# Wait for the triggered workflow to complete and check its conclusion
|
||||||
echo "⌛ Waiting for the workflow to complete..."
|
|
||||||
while true; do
|
while true; do
|
||||||
|
echo "⌛ Waiting for the workflow to complete..."
|
||||||
run_data=$(curl -s -H "Accept: application/vnd.github+json" -H "Authorization: token $GITHUB_TOKEN" \
|
run_data=$(curl -s -H "Accept: application/vnd.github+json" -H "Authorization: token $GITHUB_TOKEN" \
|
||||||
"https://api.github.com/repos/${ORG_NAME}/${REPO_NAME}/actions/runs/$run_id")
|
"https://api.github.com/repos/${ORG_NAME}/${REPO_NAME}/actions/runs/$run_id")
|
||||||
status=$(echo "$run_data" | jq -r '.status')
|
status=$(echo "$run_data" | jq -r '.status')
|
||||||
|
|||||||
Reference in New Issue
Block a user