File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 2828 - name : Checkout Repo @ SHA - ${{ github.sha }}
2929 uses : actions/checkout@v4
3030
31+ - name : Check main build status
32+ env :
33+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
34+ run : |
35+ WORKFLOW_ID=$(gh api repos/${{ github.repository }}/actions/workflows --jq '.workflows[] | select(.name=="Python Instrumentation Main Build") | .id')
36+ LATEST_RUN=$(gh api repos/${{ github.repository }}/actions/workflows/$WORKFLOW_ID/runs --jq '[.workflow_runs[] | select(.head_branch=="${{ github.ref_name }}")] | sort_by(.created_at) | .[-1] | {conclusion, status}')
37+ STATUS=$(echo "$LATEST_RUN" | jq -r '.status')
38+ CONCLUSION=$(echo "$LATEST_RUN" | jq -r '.conclusion')
39+
40+ if [ "$STATUS" = "in_progress" ] || [ "$STATUS" = "queued" ]; then
41+ echo "Main build is still running (status: $STATUS). Cannot proceed with release."
42+ exit 1
43+ elif [ "$CONCLUSION" != "success" ]; then
44+ echo "Latest main build on branch ${{ github.ref_name }} conclusion: $CONCLUSION"
45+ exit 1
46+ fi
47+ echo "Main build succeeded, proceeding with release"
48+
3149 - name : Build Wheel and Image Files
3250 uses : ./.github/actions/artifacts_build
3351 with :
You can’t perform that action at this time.
0 commit comments