Skip to content

Commit

Permalink
fix: Add delay before checking latest workflow id (#348)
Browse files Browse the repository at this point in the history
  • Loading branch information
onuzbee authored Dec 2, 2021
1 parent 892c7f1 commit a072f8c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .github/scripts/trigger-and-wait.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ trigger_workflow() {

wait_for_workflow_to_finish() {
# Find the id of the last build
sleep "${wait_interval}" # Let workflow be triggered before fetching the latest workflow
last_workflow=$(curl -X GET "https://api.github.com/repos/${INPUT_OWNER}/${INPUT_REPO}/actions/workflows/${INPUT_WORKFLOW_FILE_NAME}/runs" \
-H 'Accept: application/vnd.github.antiope-preview+json' \
-H "Authorization: Bearer ${INPUT_GITHUB_TOKEN}" | jq '[.workflow_runs[]] | first')
Expand Down

0 comments on commit a072f8c

Please sign in to comment.