Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,24 @@ jobs:
fi
echo "Main build succeeded, proceeding with release"

- name: Check main build status
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
WORKFLOW_ID=$(gh api repos/${{ github.repository }}/actions/workflows --jq '.workflows[] | select(.name=="Python Instrumentation Main Build") | .id')
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}')
STATUS=$(echo "$LATEST_RUN" | jq -r '.status')
CONCLUSION=$(echo "$LATEST_RUN" | jq -r '.conclusion')

if [ "$STATUS" = "in_progress" ] || [ "$STATUS" = "queued" ]; then
echo "Main build is still running (status: $STATUS). Cannot proceed with release."
exit 1
elif [ "$CONCLUSION" != "success" ]; then
echo "Latest main build on branch ${{ github.ref_name }} conclusion: $CONCLUSION"
exit 1
fi
echo "Main build succeeded, proceeding with release"

- name: Build Wheel and Image Files
uses: ./.github/actions/artifacts_build
with:
Expand Down