Skip to content

Multi-chain, multi-denom support for drip #937

Multi-chain, multi-denom support for drip

Multi-chain, multi-denom support for drip #937

name: Require Garnix CI Success
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- main
merge_group:
permissions:
checks: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
evaluate-app-status:
runs-on: ubuntu-latest
steps:
- name: Evaluate Checks
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
REF: ${{ github.head_ref }}
run: |
sleep 15
status=''
while [[ $status != 'completed' ]]; do
check_suites=$(gh api \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"/repos/$REPO/commits/$REF/check-suites")
status=$(echo "$check_suites" | jq -r '.check_suites | .[] | select(.app.name == "Garnix CI") | .status')
sleep 15
done
conclusion=$(echo "$check_suites" | jq -r '.check_suites | .[] | select(.app.name == "Garnix CI") | .conclusion')
case "$conclusion" in
failure | timed_out | action_required | stale | startup_failure)
echo "ERROR: Garnix CI concluded with $conclusion"
exit 1
;;
*)
echo "INFO: Garnix CI concluded with $conclusion"
;;
esac