diff --git a/.github/workflows/securityAlertsReview.yml b/.github/workflows/securityAlertsReview.yml index ac6f6ee2d..4e2bb53cd 100644 --- a/.github/workflows/securityAlertsReview.yml +++ b/.github/workflows/securityAlertsReview.yml @@ -41,9 +41,15 @@ jobs: LATEST_RUN=$(curl -s -H "Authorization: token ${GITHUB_TOKEN}" \ "https://api.github.com/repos/${{ github.repository }}/actions/workflows/olympixStaticAnalysis.yml/runs?status=completed&per_page=10") + echo "LATEST_RUN" + echo $LATEST_RUN + # Filter to find the first run with head_branch matching our branch name WORKFLOW_STATUS=$(echo "$LATEST_RUN" | jq -r --arg branch "$BRANCH_NAME" '.workflow_runs[] | select(.head_branch == $branch) | .conclusion' | head -n1) + echo "WORKFLOW_STATUS" + echo $WORKFLOW_STATUS + if [[ "$WORKFLOW_STATUS" != "success" ]]; then echo "The Olympix Static Analysis workflow has not been successfully completed for branch: $BRANCH_NAME." echo "The Security Alerts Review workflow cannot continue because a valid Olympix Static Analysis report is required."