File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -31,16 +31,15 @@ jobs:
3131 - name : Get job-specific URL
3232 run : |
3333 echo "Fetching job URL for current matrix job..."
34+ # Get the full job name including matrix suffix
35+ CURRENT_JOB_NAME="${{ github.job }}${{ matrix.chunk != null && ' (' + matrix.chunk + ')' || '' }}"
36+
3437 JOB_URL=$(curl -s \
3538 -H "Accept: application/vnd.github+json" \
3639 -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
3740 "${{ github.api_url }}/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs" \
38- | jq -r --arg JOB "${{ github.job }}" --argjson MATRIX "${{ toJson(matrix) }}" '
39- .jobs[]
40- | select(.name | startswith($JOB))
41- | select(.name | contains($MATRIX.chunk))
42- | .html_url
43- ')
41+ | jq -r --arg JOB "$CURRENT_JOB_NAME" '.jobs[] | select(.name==$JOB) | .html_url')
42+
4443 echo "Job URL: $JOB_URL"
4544 echo "JOB_URL=$JOB_URL" >> $GITHUB_ENV
4645
You can’t perform that action at this time.
0 commit comments