21 lines
482 B
Bash
Executable File
21 lines
482 B
Bash
Executable File
#!/bin/sh
|
|
|
|
while true ;do
|
|
CURRENT_COMMIT=$(git submodule status forgejo/ | cut -d ' ' -f2)
|
|
CI_VERIFY=$(curl https://sc.cryxtal.org/api/v1/repos/crystal/forgejo/commits/$CURRENT_COMMIT/status | jq --jsonargs .state)
|
|
case "$CI_VERIFY" in
|
|
'"success"')
|
|
echo "CI pipeline passed!"
|
|
exit 0
|
|
;;
|
|
'"pending"')
|
|
echo "CI pipeline still pending, checking again in 2 minutes..."
|
|
sleep 120
|
|
;;
|
|
*)
|
|
echo "ERROR: Bad pipeline status $CI_VERIFY"
|
|
exit 1
|
|
;;
|
|
esac
|
|
done
|