File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 2727 - uses : actions/checkout@v5
2828
2929 - name : Check main build status
30+ env :
31+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3032 run : |
3133 WORKFLOW_ID=$(gh api repos/${{ github.repository }}/actions/workflows --jq '.workflows[] | select(.name=="Java Agent Main Build") | .id')
32- LATEST_RUN=$(gh api repos/${{ github.repository }}/actions/workflows/$WORKFLOW_ID/runs --jq '.workflow_runs[] | select(.head_branch=="${{ github.ref_name }}") | {conclusion, status}' | head -1 )
34+ 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) | reverse | .[0] | {conclusion, status}')
3335 STATUS=$(echo "$LATEST_RUN" | jq -r '.status')
3436 CONCLUSION=$(echo "$LATEST_RUN" | jq -r '.conclusion')
3537
4143 exit 1
4244 fi
4345 echo "Main build succeeded, proceeding with release"
44- env :
45- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4646 - uses : actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
4747 with :
4848 java-version-file : .java-version
You can’t perform that action at this time.
0 commit comments