Skip to content

Commit

Permalink
Updated some files [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
hotio committed Sep 3, 2023
1 parent bb2eb6b commit ce79841
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,8 @@ jobs:
if [[ ${CHANGELOG} != null ]]; then
VERSION="[${VERSION:----}](${CHANGELOG})"
fi
if [[ ! -f "screenshot.png" ]]; then
curl -fsSL --retry 5 "https://hotio.dev/img/pullio-background.png" > screenshot.png
if [[ -f "screenshot.png" ]]; then
IMAGE_JSON=',"image": {"url": "attachment://screenshot.png"}'
fi
json='{
"embeds": [
Expand All @@ -348,11 +348,12 @@ jobs:
"footer": {
"text": "Powered by GitHub Actions"
},
"timestamp": "'$(date -u +'%FT%T.%3NZ')'",
"image": {
"url": "attachment://screenshot.png"
}
"timestamp": "'$(date -u +'%FT%T.%3NZ')'"'"${IMAGE_JSON}"'
}
]
}'
curl -fsSL --retry 5 -H "Content-Type: multipart/form-data" -F "file=@screenshot.png" -F "payload_json=${json}" "${DISCORD_WEBHOOK}" > /dev/null
if [[ -f "screenshot.png" ]]; then
curl -fsSL --retry 5 -H "Content-Type: multipart/form-data" -F "file=@screenshot.png" -F "payload_json=${json}" "${DISCORD_WEBHOOK}" > /dev/null
else
curl -fsSL --retry 5 -H "Content-Type: multipart/form-data" -F "payload_json=${json}" "${DISCORD_WEBHOOK}" > /dev/null
fi

0 comments on commit ce79841

Please sign in to comment.