Skip to content

Commit 605c2ef

Browse files
authored
Refactor payload construction in gradle.yml
1 parent f27ddd9 commit 605c2ef

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/gradle.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,16 @@ jobs:
5252
COMMIT_HASH=$(git rev-parse --short HEAD)
5353
COMMIT_URL="https://github.com/${{ github.repository }}/commit/${COMMIT_HASH}"
5454
BRANCH_NAME="${{ github.ref_name }}"
55-
55+
5656
EMBED_PAYLOAD=$(jq -n \
57+
--arg username "SkyblockTweaks Bot" \
58+
--arg avatar_url "https://cdn.modrinth.com/data/5SDy0bij/85f954e6f5727fa5f49425fc677b5ec663491a07_96.webp" \
5759
--arg title "🚀 SkyblockTweaks Nightly Build #${BUILD_NUMBER} [$BRANCH_NAME]" \
5860
--arg commit "**Commit:** [$COMMIT_MESSAGE]($COMMIT_URL)" \
5961
--arg timestamp "$(date -u +%Y-%m-%dT%H:%M:%S.000Z)" \
6062
'{
63+
username: $username,
64+
avatar_url: $avatar_url,
6165
embeds: [{
6266
title: $title,
6367
description: ($commit),
@@ -71,7 +75,7 @@ jobs:
7175
}
7276
}]
7377
}')
74-
78+
7579
curl -X POST \
7680
-H "Content-Type: multipart/form-data" \
7781
-F "payload_json=${EMBED_PAYLOAD}" \

0 commit comments

Comments
 (0)