File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,18 +7,30 @@ echo "-----------------------------------------------------"
77VERSION=$( grep -m 1 ' ^version = ' Cargo.toml | sed ' s/version = "\(.*\)"/\1/' )
88TAG=" v$VERSION "
99
10- echo " Waiting for Github Actions to complete for branch $TAG ..."
10+ SHA=$( git rev-parse " $TAG " )
11+
12+ echo " Waiting for Github Actions to register runs for commit $SHA ($TAG )..."
13+ while true ; do
14+ TOTAL_RUNS=$( gh run list --commit " $SHA " --json status -q ' length' )
15+ if [ " $TOTAL_RUNS " -gt 0 ]; then
16+ break
17+ fi
18+ echo " Waiting for runs to start..."
19+ sleep 5
20+ done
21+
22+ echo " Waiting for Github Actions to complete for commit $SHA ..."
1123while true ; do
12- ACTIVE_RUNS=$( gh run list --branch " $TAG " --json status -q ' map(select(.status != "completed")) | length' )
24+ ACTIVE_RUNS=$( gh run list --commit " $SHA " --json status -q ' map(select(.status != "completed")) | length' )
1325 if [ " $ACTIVE_RUNS " -eq 0 ]; then
1426 break
1527 fi
1628 echo " Still running: $ACTIVE_RUNS workflows active..."
1729 sleep 10
1830done
1931
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' )
32+ TOTAL_RUNS=$( gh run list --commit " $SHA " --json conclusion -q ' length' )
33+ SUCCESS_RUNS=$( gh run list --commit " $SHA " --json conclusion -q ' map(select(.conclusion == "success")) | length' )
2234
2335if [ " $SUCCESS_RUNS " -eq " $TOTAL_RUNS " ] && [ " $TOTAL_RUNS " -gt 0 ]; then
2436 echo " CI pipeline completed successfully."
You can’t perform that action at this time.
0 commit comments