CI: fix AppVeyor job links only working for most recent build

Ref: https://github.com/curl/curl/pull/9768#issuecomment-1286675916
Reported-by: Daniel Stenberg

Follow up to #9769
This commit is contained in:
Marc Hoersken 2022-10-21 22:54:04 +02:00
parent 36474f1050
commit c2e9376a89
No known key found for this signature in database
GPG Key ID: AD50A64F2A32040F

View File

@ -28,7 +28,7 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo ${APPVEYOR_TARGET_URL} | sed 's/\/project\//\/api\/projects\//' | xargs -t -n1 curl -s | \
jq -c '.build.jobs[] | {target_url: (($target_url | sub("s\\/\\d+"; "/job/")) + .jobId),
jq -c '.build.jobs[] | {target_url: ($target_url + "/job/" + .jobId),
context: (.name | sub("^(Environment: )?"; "AppVeyor / ")),
state: (.status | sub("queued"; "pending")
| sub("running"; "pending")