From edd3d8d35948d92d97988af3ae631cdae01633e9 Mon Sep 17 00:00:00 2001 From: Moritz Angermann Date: Tue, 12 Nov 2024 17:44:30 +0900 Subject: [PATCH] Update main.yml (#169) * Update main.yml * Update wait-and-upload.yml --- .github/workflows/main.yml | 2 +- .github/workflows/wait-and-upload.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ccc420b..9661be4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 diff --git a/.github/workflows/wait-and-upload.yml b/.github/workflows/wait-and-upload.yml index 34faf80..cbdf0d9 100644 --- a/.github/workflows/wait-and-upload.yml +++ b/.github/workflows/wait-and-upload.yml @@ -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" @@ -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;;