diff options
author | Roman / Nea <roman.graef@gmail.com> | 2021-12-29 17:26:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-29 11:26:56 -0500 |
commit | fc642887639d1918d68f4706e27ea59605a16fcb (patch) | |
tree | ad858497c5480cc7593e3fe111c661c9a2696e76 /.github/workflows/send_webhook_update.sh | |
parent | 2b0e0f0db1a5cb204a153b65e7849c740fe1dcc5 (diff) | |
download | NotEnoughUpdates-fc642887639d1918d68f4706e27ea59605a16fcb.tar.gz NotEnoughUpdates-fc642887639d1918d68f4706e27ea59605a16fcb.tar.bz2 NotEnoughUpdates-fc642887639d1918d68f4706e27ea59605a16fcb.zip |
Github Actions Webhook Set Author picture (#48)
* change author determination method
* this should be the right extension
Diffstat (limited to '.github/workflows/send_webhook_update.sh')
-rwxr-xr-x | .github/workflows/send_webhook_update.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/.github/workflows/send_webhook_update.sh b/.github/workflows/send_webhook_update.sh index 1fc39adf..56852159 100755 --- a/.github/workflows/send_webhook_update.sh +++ b/.github/workflows/send_webhook_update.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -x COLOR_SUCCESS=8040199 COLOR_WORKING=7472302 @@ -20,7 +21,7 @@ case "$STATUS" in ;; esac -author_name=$(git log -1 --pretty=format:'%an') +author_name="$ACTOR" commit_hash=$(git log -1 --pretty=format:'%h') commit_subject=$(git log -1 --pretty=format:'%s') commit_body=$(git log -1 --pretty=format:'%b') @@ -68,6 +69,7 @@ function make_request() { curl -X $1 -H "Content-Type: multipart/form-data" -F "payload_json=$json" "$upload_arg" "$upload_name=@$to_upload" "$WEBHOOK_URL$2?wait=true" } +echo "Should replace message with id: $MESSAGE_ID" if [ "$MESSAGE_ID" != "" ]; then discord_output=$(make_request PATCH "/messages/$MESSAGE_ID") RESULT=$? @@ -83,4 +85,4 @@ fi echo "Message sent to discord." echo "$discord_output" | jq . id_string=$(echo "$discord_output" | jq .id) -echo "::set-output name=MESSAGE_ID=${id_string//\"/}" +echo "::set-output name=MESSAGE_ID::${id_string//\"/}" |