Fix asset upload: use multipart/form-data (-F) not raw binary
This commit is contained in:
parent
a852a0acfb
commit
de21ca4779
1 changed files with 1 additions and 2 deletions
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
|
|
@ -161,9 +161,8 @@ jobs:
|
|||
name=$(basename "$diff" | sed 's/-diff-chromium-[a-z]*\.png//' | sed 's/-/ /g')
|
||||
response=$(curl -s -w "\n%{http_code}" -X POST \
|
||||
-H "Authorization: Bearer $VISUAL_DIFF_TOKEN" \
|
||||
-H "Content-Type: image/png" \
|
||||
-H "Accept: application/json" \
|
||||
--data-binary @"$diff" \
|
||||
-F "file=@$diff;type=image/png" \
|
||||
"https://uploads.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/assets?name=$(basename $diff)")
|
||||
http_code=$(echo "$response" | tail -1)
|
||||
body_resp=$(echo "$response" | head -1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue