Paginate GitHub job runs to find all jobs, not only the first page

Closes #25699

Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
This commit is contained in:
Alexander Schwartz 2023-12-19 13:43:31 +01:00 committed by Bruno Oliveira da Silva
parent baafb670f7
commit 3ebf5be5da

View file

@ -32,7 +32,7 @@ runs:
JOB_NAME="$JOB_NAME ($MATRIX)" JOB_NAME="$JOB_NAME ($MATRIX)"
fi fi
JOB_URL=$(gh api repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs --jq ".jobs | map(select(.name == \"$JOB_NAME\")) | .[].html_url") JOB_URL=$(gh api repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs --paginate --jq ".jobs | map(select(.name == \"$JOB_NAME\")) | .[].html_url")
echo "job_name=$JOB_NAME" >> job-summary.properties echo "job_name=$JOB_NAME" >> job-summary.properties
echo "job_url=$JOB_URL" >> job-summary.properties echo "job_url=$JOB_URL" >> job-summary.properties