Skip to content

Commit

Permalink
Make slightly different logic to avoid --jq
Browse files Browse the repository at this point in the history
  • Loading branch information
artembilan committed Aug 27, 2024
1 parent 956e662 commit 2fba991
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/test-call-workflow-and-wait.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,14 @@ jobs:
gh workflow run $workflowFile
sleep 60
currentWorkflowRunId=$(gh api repos/$GITHUB_REPOSITORY/actions/workflows/$workflowFile/runs?event=workflow_dispatch&created=">=$dispatchDate" -q '.workflow_runs[0].id')
echo Other workflow current run: $(gh api repos/$GITHUB_REPOSITORY/actions/runs/$currentWorkflowRunId -q '.html_url')
run_data=$(gh api repos/$GITHUB_REPOSITORY/actions/workflows/$workflowFile/runs?event=workflow_dispatch&created=>=$dispatchDate)
currentWorkflowRunId=$(echo "$run_data" | jq -r '.workflow_runs[0].id')
run_data=$(gh api repos/$GITHUB_REPOSITORY/actions/runs/$currentWorkflowRunId)
echo Other workflow current run: $(echo "$run_data" | jq -r '.html_url')
while true; do
run_data=$(gh api repos/$GITHUB_REPOSITORY/actions/runs/$currentWorkflowRunId)
Expand Down

0 comments on commit 2fba991

Please sign in to comment.