Skip to content

Commit

Permalink
Update main.yml (#169)
Browse files Browse the repository at this point in the history
* Update main.yml

* Update wait-and-upload.yml
  • Loading branch information
angerman authored Nov 12, 2024
1 parent 8acf1c1 commit edd3d8d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
steps:
- uses: input-output-hk/actions/wait-for-hydra@latest
with:
status: ci/hydra-build:required
check: ci/hydra-build:required

upload:
needs: wait-for-hydra-eval
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/wait-and-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ jobs:
# For GitHub Apps
# conclusion=$(gh api repos/$GITHUB_REPOSITORY/commits/$GITHUB_SHA/status --jq '.check_runs[] | select(.name == "ci/hydra-build:$DEV_SHELL") | .conclusion')
# For GitHub Statuses; we need --paginate because there are so many statuses
echo "Querying: gh api repos/$GITHUB_REPOSITORY/commits/$GITHUB_SHA/status --paginate --jq '.statuses[] | select(.context == \"ci/hydra-build:$DEV_SHELL\") | .state'"
conclusion=$(gh api "repos/$GITHUB_REPOSITORY/commits/$GITHUB_SHA/status" --paginate --jq ".statuses[] | select(.context == \"ci/hydra-build:$DEV_SHELL\") | .state")
echo "gh api repos/$GITHUB_REPOSITORY/commits/$GITHUB_SHA/check-runs --paginate --jq '.check_runs[] | select(.name == \"ci/hydra-build:$DEV_SHELL\") | .conclusion'"
conclusion=$(gh api repos/$GITHUB_REPOSITORY/commits/$GITHUB_SHA/check-runs --paginate --jq '.check_runs[] | select(.name == \"ci/hydra-build:$DEV_SHELL\") | .conclusion")
case "$conclusion" in
success)
echo "ci/hydra-build:$DEV_SHELL succeeded"
Expand All @@ -54,7 +54,7 @@ jobs:
exit 1;;
*)
echo "conclusion is: '$conclusion'"
gh api repos/$GITHUB_REPOSITORY/commits/$GITHUB_SHA/status --paginate --jq '.statuses[] | .state+"\t"+.context'|sort
gh api repos/$GITHUB_REPOSITORY/commits/$GITHUB_SHA/check-runs --paginate --jq '.check_runs[] | .conclusion+"\t"+.name'|sort
WAIT=$((180 + RANDOM % 180))
echo "ci/hydra-build:$DEV_SHELL pending. Waiting ${WAIT}s..."
sleep $WAIT;;
Expand Down

0 comments on commit edd3d8d

Please sign in to comment.