File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,15 +9,18 @@ TAG="v$VERSION"
99
1010echo " Waiting for Github Actions to complete for branch $TAG ..."
1111while true ; do
12- STATUS=$( gh run list --branch " $TAG " --json status,conclusion -q ' .[0].status' )
13- CONCLUSION=$( gh run list --branch " $TAG " --json status,conclusion -q ' .[0].conclusion' )
14- if [ " $STATUS " == " completed" ]; then
12+ ACTIVE_RUNS=$( gh run list --branch " $TAG " --json status -q ' map(select(.status != "completed")) | length' )
13+ if [ " $ACTIVE_RUNS " -eq 0 ]; then
1514 break
1615 fi
16+ echo " Still running: $ACTIVE_RUNS workflows active..."
1717 sleep 10
1818done
1919
20- if [ " $CONCLUSION " == " success" ]; then
20+ TOTAL_RUNS=$( gh run list --branch " $TAG " --json conclusion -q ' length' )
21+ SUCCESS_RUNS=$( gh run list --branch " $TAG " --json conclusion -q ' map(select(.conclusion == "success")) | length' )
22+
23+ if [ " $SUCCESS_RUNS " -eq " $TOTAL_RUNS " ] && [ " $TOTAL_RUNS " -gt 0 ]; then
2124 echo " CI pipeline completed successfully."
2225
2326 echo " Cleaning old artifact directories..."
You can’t perform that action at this time.
0 commit comments